rebasing local branch from origin
git pull --rebase
if rebasing from a different remote branch
git pull --rebase origin master
most of the time, after pull, you’ll need to update the submodules
git submodule update --init —recursive
this will open up the interactive rebase, starting the the last commit from the tracking branch (origin/develop)
git rebase -i
then we get the interactive commits picker (order is reverse, compared to git log)
pick/edit/whatever
fix commit
git add [affected files]
git commit --amend
when satisfied - continue
git rebase --continue
Splitting a commit:
git reset HEAD~
if it is further than the last commit, first edit it with rebase:
git rebase -i HEAD~3
then do
git reset HEAD~
split as you like, and then
git rebase —continue
amend you commit, and then force push it.
git push --force origin HEAD:[your local branch, e.g., master]
we are merging upstream branch release-0.0.x, into master
first, checkout the branch from GHE to your local repo, and branch that
git checkout -b merging00x upstream/master
now, merge the upstream branch into
git merge upstream/release-0.0.x --log
fix any conflicts (fix the conflict and do git add filename
)
when done:
git commit
then push to your git fork
git push origin merging00x
create a pull request from you merging00x fork to the upstream master
git fetch upstream pull/1234/head:pr-1234
git co pr-1234
Core push
Go to native/src/core
git fetch && git reset --hard origin/master
Do your changes and commit
git push origin HEAD:refs/publish/master
To push to Gerrit as draft:
git push origin HEAD:refs/drafts/develop
Or
git push origin HEAD:refs/drafts/personal_branch
Or to push to Gerrit for the develop branch:
git push origin HEAD:refs/for/develop