Reputation: 21
Problem Statement:
What is the way to merge changes from a revision from file A (10_34_0_0.XML) to file B (10_35_0_0.XML) in TortoiseGIT
in 2 different branches?
Background of the problem: We recently did a SVN to GIT migration, the later realized that the team is heavily using the TortoiseSVN
file merge functionality WITH selecting changes from a revision.
We were not able to find similar functionality in TortoiseGIT
. This is not the same as GIT Cherry Picking. In Cherry picking you can select commit/set of commits to merge from the same file in 2 different branches.
Example: TortoiseSVN
Process.
Step 1: Select File and click merge.
Step 3: Select the file and the branch you want to merge from
Step 4: Select the revision that you want the changes from
Upvotes: 0
Views: 701
Reputation: 52236
As suggested in this other question, one way to do this from the command line is :
git diff
)patch
utilityIn more details :
git diff revisionA^ revision -- 10_34_0_0.XML > patch_file
cat patch_file | patch 10_35_0_0.XML
# you can write the above as a one liner with no tmp file :
git diff revisionA^ revision -- 10_34_0_0.XML | patch 10_35_0_0.XML
On Windows, you can run this from git-bash
(the installation comes with the patch
utility).
I wouldn't know how to do this through TortoiseGIT
's GUI however.
Upvotes: 2