I\'m using Git on a new project that has two parallel -- but currently experimental -- development branches:
master
: import of existing codebase pl
Here is how you can replace Myclass.java
file in master
branch with Myclass.java
in feature1
branch. It will work even if Myclass.java
doesn't exist on master
.
git checkout master
git checkout feature1 Myclass.java
Note this will overwrite - not merge - and ignore local changes in the master branch rather.