I have, what I assume, is a typical workflow.
Our project works with pull requests.
To develop new feature I create a dev. branch. By the time I am finished with the feature some changes were made in master so I want to get those changes into my branch so I make pull request.
From what I've read on the internet there are two options for that:
- merge
- rebase
However, I tried both of them but when I make pull request it shows that all files were changed in this pr.
Here is what I did:
on the branch
-- git commit -a -m "changes i made on my branch"
-- git checkout master
-- git fetch upstream
-- git merge upstream/master
-- git checkout mybranch
-- git merge master (or rebase)
-- git push origin mybranch
result -- merge commit in the history shows files changes: 90
What is the correct way to get updates from master into my branch?
Similar situation happens when somebody reviews my pr and I need to update my pr. Once again, I end up needing the changes from master.
Thanks for the help.