I realize there are many questions on syncing branches, and the difference between git commands, but I am finding it hard to know what is the correct process for this.
I am the maintainer of a repository on GitHub. One of the members on my team cloned the repo, created a new-feature
branch, pushed this new-feature
branch into the GitHub repository, and created a pull request to merge it into master
. I approved the pull request and merged it into master
on the GitHub website.
What is the correct process to pull this 'new master' down to update my local repository so I have my local directory synchronized, cleanly and without re-writing any history?
git pull
--> essentially does agit fetch
thengit merge
...into the branch I'm on?git pull --rebase
--> essentially does agit fetch
thengit rebase
?git fetch
thengit merge origin/master
--> same as option 1?git fetch
thengit rebase origin/master
--> same as option 2?