What this does is replace a file on a branch with the file from the other branch.The actual solution would look like this:
Say I had a file1.txt in branch B I wanted to merge with a file1.txt in branch A.
git checkout A
git checkout --patch B file1.txt
1.First, get yourself to branch A(Where you want to do the merge).
2.Patch with the file from branch B.
If your file1.txt does not exist in branch A , leave out the option --patch.
Note that once this command is run, you can accept options that will be provided in the terminal. You can choose to accept with the y or regect with n and so on
What this does is replace a file on a branch with the file from the other branch.The actual solution would look like this:
Say I had a
file1.txt
in branch B I wanted to merge with afile1.txt
in branch A.1.First, get yourself to branch A(Where you want to do the merge).
2.Patch with the file from branch B.
If your file1.txt does not exist in branch A , leave out the option --patch.
Note that once this command is run, you can accept options that will be provided in the terminal. You can choose to accept with the y or regect with n and so on
Thanks, this saved my googling time :)
Glad I could help
Thanks a lot !