Suppose if you have two branches called "Master" and "test". In some cases if you want to checkout the master branch particular file/files in your test branch. That time the following git checkout command will be very useful.
* Move to your test branch using the following command,
git checkout test
# on test branch do the following command,
git checkout master -- file1.extentsion, file2.extention
The above command will checkout the files from the master branch and override your current branch(in this case "test") file changes.
No comments:
Post a Comment