Reputation: 31
After I branch from master
, after a while, when I pull (other people's) code from master
there are merge conflicts (i.e. package.json and package-lock.json).
I usually git rebase master
my branch, but when I push my code, it shows other people's commits since I have branched off in the "Changed Files" section of the PR.
How do I keep my branch up to date with master
without including other developers changes, just my changes for my branch?
Upvotes: 2
Views: 722
Reputation: 31
This way has worked for me (assume a branch develop
has branched off of master
):
master
): git pull origin master
develop
): git checkout develop
develop
): git merge master
Resolve merge conflicts 1 by 1 then git commit
when prompted
Upvotes: 1