Answer the question
In order to leave comments, you need to log in
How to merge some files from another branch in GIT?
Good afternoon!
How to merge from often files from another branch?
Let's say I have a "feature" branch, and in it:
feature-1.cpp
feature-2.cpp
feature-3.cpp
feature-4.cpp
feature-5.cpp
And I want to merge into the master, only 1 and 2 file
Answer the question
In order to leave comments, you need to log in
If files 1 and 2 are not in your branch, but only in feature:
$ git checkout feature -- feature-1.cpp feature-2.cpp
$ git add --all
$ git commit -m "Merge some files from feature"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question