I'm using SourceTree and would like to merge a commit from staging back to master. However, there are a few files in the commit that shouldn't be merged. I can't see where SourceTree allows me to mark the files to not merge.
How can I do this? I'd like it to be a permanent marking, so I don't accidentally merge them in the future.
Git does not allow you to select specific files that should be part of the merge, it is all or nothing. What you can do is create a new branch, check it out, and then use
git checkout source_branch <file_path> ...
The source branch is your staging and then specify the files that you want to merge into master. Once done, merge the branch with master and you should be all set.
Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs