GIT Checkout a File from One Branch to Another via Command Line

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).