Posted By

satie83 on 07/26/12


Tagged

show branches git


Versions (?)

GIT - How to get just one file from another branch


 / Published in: Bash
 

URL: http://stackoverflow.com/questions/2364147/how-to-get-just-one-file-from-another-branch

I am using git and working on master branch. This branch has a file called app.js .

I have an experiment branch in which I made a bunch of changes and tons of commit. Now I want to bring all the changes done only to app.js from experiment to master branch.

  1. git show experiment:path/to/app.js
  2.  
  3. git show experiment:path/to/app.js > path/to/app.js /* In order to copy the file of expermient branch to our current branch */

Report this snippet  

You need to login to post a comment.