Confusing amend commit behaviour
By @ch3cooli on October 14, 2012 01:20 (imported from Google Code)
I do not use "Add" to stage files. I always use the Commit Dialog directly.
But the amend function is confusing when I deselect a file that I have wrongly committed.
For example, I committed 1.txt and 2.txt, but later I do not want to commit 2.txt at the moment so I amend the commit not to include the latest change to 2.txt
What steps will reproduce the problem?
- Create a repository
- Create 1.txt and commit it (commit 1)
- Create 2.txt and commit it (commit 2)
- Modify (first time) 1.txt and commit it (commit 3)
- Modify (first time) 2.txt and commit it (commit 4)
- Modify (second time) 1.txt and 2.txt and commit them (commit 5)
- Use Commit Dialog to amend commit: check 1.txt but uncheck 2.txt, then click OK (commit 5')
What is the expected output? What do you see instead?
Expected: 2.txt
(commit 5') has the content of (commit 4),
working dir has the content of (commit 5).
1.txt is fine.
Actual: 2.txt
(commit 5') has the content of (commit 2),
working dir has the content of (commit 5).
1.txt is fine.
What version of TortoiseGit and msysgit are you using? On
what operating system?
TortoiseGit 1.7.13
Please provide any additional information below.
Also, in some situation, if a file is not checked (tracked file), Commit Dialog may make it staged if not staged. I use the command line 'git status' to discover that.