0

I want to apply a patch and include missing files. The new files and patch originate from a branch and want to apply it to my master branch. I'm looking for a one liner, if it exists. I guess I want to merge missing files that are mentioned in patch.

madphp
  • 1,716
  • 5
  • 31
  • 72

2 Answers2

0

If I've understood your question correctly, you'd like to merge a branch which has the necessary changes that you expect to a master branch. If that is right, then

checkout master

git checkout master

merge the branch which has your changes to the master

git merge branch_name

If I've mistaken your question, and what you have is only a set of patches like 000x-feature-y.patch, then checkout master, then apply all the patches to it like this

git am /path/to/the/patches/dir/*.patch

If the above doesn't answer your question, please try to make your question clear!

HTH

positron
  • 1,652
  • 1
  • 11
  • 14
  • I only want to patch files from branches latest commit. Will a git merge, merge all updated files. – madphp May 25 '12 at 15:02
  • Refer here[1] for a detailed example of merging. [1] http://www.quora.com/Git-revision-control/How-does-git-merge-work – positron May 25 '12 at 15:48
0

You can cherry-pick them:

Community
  • 1
  • 1
ellotheth
  • 4,333
  • 2
  • 17
  • 29