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?
Asked
Active
Viewed 1,676 times
1 Answers
1
To do this in git, you go about it like this:
- Checkout branch a:
git checkout A
- Checkout file from branch b:
git checkout B -- Constants.java
- Commit your changes:
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).

Community
- 1
- 1

Nevik Rehnel
- 49,633
- 6
- 60
- 50