2

I am new to git. I and working in the dev branch. I need to merge one file to the master branch in my local repo and then check in the master. How do I do that?

I see this on guthub cheat sheet but qiute to nkt see the logic.

git merge laptop/xyz

So if file myfile then

git merge myfile master/origin?
Felix Kling
  • 795,719
  • 175
  • 1,089
  • 1,143
Tampa
  • 75,446
  • 119
  • 278
  • 425

1 Answers1

3

Follow the below steps :

1) git branch
* master
  your_new_brach
2) git checkout your_new_brach my_file1 my_file2 my_file3
3) git status # You will see new changes into master branch 
4) git commit -m "'Merge' changes from 'your_new_brach' branch"

I think link is similar to your problem : How do you merge selective files with git-merge?

Community
  • 1
  • 1
Vik
  • 5,931
  • 3
  • 31
  • 38
  • check the link : http://jasonrudolph.com/blog/2009/02/25/git-tip-how-to-merge-specific-files-from-another-branch/ – Vik Apr 10 '12 at 11:15