I am a newbie in Git. I have the following setup.
SETUP:
master-branch: Main stable branch of my project. Actually, it contains the html code of my website.
When I uploaded the files on the web, I did some changes in index.html to adjust proper file locations. So I have two versions of the same file: masterbranch (mbVersion) and web (wVersion)
WHAT I HAVE DONE:
Now I have done some changes in the mbVersion. I want those changes in the wVersion. (But I don't want to change the links in wVersion to the old mbVersion)
WHAT I PLAN TO DO:
I'm thinking to create a new branch for web version(say Web-branch), then merge specific commits from master-branch to Web-branch.
QUESTION:
Am I doing it right? Is there any other better way?
If, this is the correct way, will merging that specific commit to the web-branch give me the desired changes and NOT change the links? So, how do I merge? I plan to use this: How can I merge a specific file from one branch into another branch in Git
- Shall I use cherry-pick?
WHAT I HAVE TRIED:
I have tried http://jasonrudolph.com/blog/2009/02/25/git-tip-how-to-merge-specific-files-from-another-branch/ but it doesn't merge the contents of both files. It basically just write over the file instead of actually merging the contents of the file.
Actually, it is a big project and ~20 people are working on it. So, I don't want to mess up anything.