Github-website-logo
Github Logo

If you are using GIT as an SCM tool for you application, you often need to work on different branches and need to move files in between branches. GIT offers you an easy way to checkout a single file from a different branch than the current one.

You can use the following GIT command on the command prompt in Windows or the terminal on a Linux environment. This command will checkout the given file from the given branch into the current branch(on which you are currently working).

git checkout <BRANCH_TO_FETCH_FILE_FROM> — <FILENAME_WITH_PATH_IN_REPOSITORY>

This command will checkout the given filename from the repository master in to the current branch which you have switched to on your local machine.

If this GIT command is not working for you, or if you are facing issues while executing this command, add a comment in the comments section below and I will try to help you out! 

NO COMMENTS

LEAVE A REPLY

*