In my blog Create Working Branch, when run git push origin <non-master>
, we actually create a pull request.
More references, it also talks about creating pull request from fork.
I am sometimes confusing about the term, why it is called pull request
not push request
(because I push my code to remote repo)? And I am not alone, a reasonable explanation see here: Because You are asking the target repository grab your changes, stand on their side it is a pulling operation.
If the changes in local branch develop
are ready, but the remote branch develop
is out of date, after git pull origin develop
your local get messy, you can use git reset --hard
roll back to the last commit you made, next delete remote branch on github GUI, then do the git push origin develop
to recreate it.