Git merge specific file from another branch

alexruzenhack

Alex Ruzenhack

Posted on August 23, 2018

Git merge specific file from another branch

There are two teams working on the same project and they realize a common problem that was already resolved by one side, but the status of work in each branch is in progress and to make a merge can be unsafe.

How to solve this problem?

There is a safe solution: merge a specific file from another branch. And there is the steps:

$ git checkout <another-branch> <path-to-file> [<one-more-file> ...]
$ git status
$ git commit -m "'Merge' specific file from '<another-branch>'"

That's it!

Here is a more detailed approach.

💖 💪 🙅 🚩
alexruzenhack
Alex Ruzenhack

Posted on August 23, 2018

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related