I ran into problems by merging the master branch with my feature branch. So I tried to understand how git handles merges and what's the best way to update a feature branch with the changes from the master branch. I found 2 solutions.
Number 1:
git checkout feature_branch
git merge master
Number 2:
git checkout feature_branch
git pull origin master // Read: pull the changes from origin/master into my current local branch 'feature_branch'
I read about the second solution only once whereas the first one came quite often to my eyes. Since git merge
always completes with a commit, I like the second one more but wonder if it is really working the way it should.
I would appreciate any clarification.