0 votes
1 view
ago in Devops and Agile by (3.1k points)

I am using git and working on the 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 commits. Now I want to bring all the changes done only to app.js from experiment to master branch.

How do I do that?

Once again I do not want a merge. I just want to bring all the changes in app.js from experiment branch to master branch.

1 Answer

0 votes
ago by (4.7k points)

Say, you are on the 'master' branch. Now you want to get 'app_new.js' file from 'new-feature' branch.

Use the following command: 

$ git checkout new-feature path/to/app_new.js

...