Here is my scenario:
I want to resolve a conflict in my repository and, in the same time, I also want to let the user to be able to commit other files without having to commit the resolved file. I tried the following:
git status: 1.txt(conflict) 2.txt(modify)
git resolve: 1.txt(modify) resolve the conflict
git commit 2.txt //Only commit 2.txt
git show log : 1.txt(modify) 2.txt(modify)
On the submission list, I only submitted 2.txt, but when viewing the log, 1.txt was submitted by default, why is this happening, and at the same time, the file status of 1.txt is still modify, how to parse this, I am a bit confused? Thanks in advance for your help!
Conflicts always need to be resolved before committing.
If you unselect a file then the changes are not part of the commit, i.e. the file stays in the unmerged version in the commit.