Edgar.A Edgar.A - 1 month ago 7x
Git Question

Github rebase fork's local branch on remote origin branch

I'm quite new to contributing to OS and after submitting pull request, author asked me to rebase my local branch on top of origin's master (I created my local branch from wrong branch). However I'm not really sure how I do it. From my local branch I try using 'git rebase origin/master' but it says my curren local branch is already up to date.


You first need to make sure your local repo is up-to-date with the upstream repo, by following these instructions.

Now that your master branch is up-to-date with the upstream's master branch, you can checkout to your local branch and rebase:

git checkout my-local-branch
git rebase master

Once the rebase is done, push your new local branch to github (you'll have to force the push):

git push origin my-local-branch --force-with-lease

The pull request will detect the change automatically.