I am just trying to work on a new featureA but would like to keep up with any commits coming from origin/master. Will the following work? is it the best way to do it?
git clone ssh://xxx/repo
git branch --track featureA origin/master
[do work on featureA and commit]
git commit -m"all changes made in featureA"
git push
day to day work:
git pull (pull the latest from origin/master)
[merge the new commits coming from origin/master with my local featureA changes]
git commit -m"resolved conflicts"
git push origin/featureA
When time is ready to merge featureA into master:
git checkout master
git merge featureA
git push origin/master
does it sound right?
Update the master independently. You don’t even need to check it out if you didn’t commit anything on it (including merges of your feature):
Now if you want to include those latest changes, you can
When you want to include your changes in the master
I would not use pull as I usually like to see what was fetched with
git fetchand then act accordingly with a merge or rebase or whatever.