I have a text file committed and pushed to the master branch. My co-worker made a separate branch from the master branch and made some changes in the file - he made a revision of the text. The changes are made in a single commit and in a single file.
Now, I want to merge some of his changes to the original file in the master branch. But! I do not want to accept everything, just some of the changes.
The changes are made on various lines of the same file: some lines changed, some added, some removed in the revision. How can I achieve that?
If I understand the git correctly, simple merge of the revision branch to the master will not detect conflicts as I have made no changes in the master branch. Also, the merge would just apply all the changes made in the branch/commit. However, I want to apply only changes made on line (let's say) #20, 50, 69. I want to ignore the other changes as I do not agree with them.
How to make the git to arise conflicts on all changed files to enable me to select if I want to accept the change? I need some interactive way.
For instance, in MS Word, it is possible to track the changes. Then, each of the changes may be accepted (the new version is taken and the older removed) or rejected (the old version is kept and the change is thrown away). Then, the change is no longer highlighted.
I am using TortoiseGit application on MS Windows 10, running on git version 1.9.5.msysgit.1 . Therefore, if there is a way using the client I would prefer it.