git - How to merge only a single file from a certain commit -


I have 2 files that are created in a fixed branch and I would like to merge only one file with committed changes. How should I do this?

Merge the list of paths (paths) that there is no alternative. Instead, you have to do this manually, by instructing git to stop after merge, before reducing it. You can then reset the second file to the HEAD contents and keep those contents on the disk, resulting in only the first merge. For example, if there is a question in the commit 0123abc and the file you want to cancel with the merge is file2.txt :

 < Code> git merge --no-commit - no-ff 0123abc git reset HEAD file2.txt git checkout - file2.txt  

Comments

Popular posts from this blog

scala - Play Framework - how to bind form to a session field -

c++ - Why does Visual Studio Release build break on non-executing code line -

Firefox reacting to JQuery setTimeout that doesn't apply -