Skip to content

Merging files from a branch into master

Skyler Rojas edited this page Dec 8, 2013 · 2 revisions

# Use Case:

If you want to merge specific files to master but do not want to merge an entire branch with master, then do the following:

# switch your branch to master
git checkout  master 
# copy the files from your branch into master
git checkout <branch_name> path/to/file1 path/to/file2 ...
# commit changes to master
git commit -m "merging files from <branch_name>"
git push

Reference: http://jasonrudolph.com/blog/2009/02/25/git-tip-how-to-merge-specific-files-from-another-branch/

Clone this wiki locally