1

I need to pull a subset of files from my dev branch into Master. I am new to Git, and I am using it inside of VS2015 (VSTS). I want to pull 4 of 7 from dev into master but I am lost as to how.

Can I do it through the GUI, do I need to go to the command line?

James.Smith
  • 139
  • 2
  • 7

2 Answers2

1

For fine-grained operations like that, it is best to revert to the Git command-line (even for VSTS: Visual Studio Team Services) and follow some of the options of "How do you merge selective files with git-merge?".

In your case, since we are talking about only 4 files:

git checkout master
git checkout dev -- <paths>...

Or to selectively merge hunks

git checkout -p dev -- <paths>...
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

If you are talking about moving certain commits.

git checkout master
git fetch 
git cherry-pick <coma separated commit-hashes>
git push origin master

If certain files

git checkout master
git fetch
git checkout -m <revision> <yourfilepath>
git add <yourfilepath>
git commit
Chandan Rai
  • 9,879
  • 2
  • 20
  • 28