Reputation: 5850
I've an updated file Constants.java in branch A. Now I need to switch to branch B. I need only the updated Constants.java file in branch B. How do I achieve this using EGIT in eclipse?
Upvotes: 1
Views: 1736
Reputation: 51945
To do this in git, you go about it like this:
git checkout A
git checkout B -- Constants.java
git commit
In EGit, the option to check out a single file is quite hidden: it can be found in the "Replace with -> Commit..." context menu of the file. (source from this answer).
Upvotes: 1