'merging two commits skips a file from the merged commit, using git checkout -- filename brings the changes
i have two commits A, B
i want to merge B into A
git checkout A
git merge B
this skips a file(does not merge it even though the file was changed)
if i discard the merge and
checkout commit A (detached head)
git checkout B -- fileName.txt
(this changes only the selected file to the B version)
then the changes are brought correctly.
to double check i used
git diff A B -- fileName.txt
And it showed that there are indeed changes between the two commits regarding this file.
Is there a way to make sure that the merge didn't discard other files like it discarded this file ?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
