Pressing Ctrl-C during 'git checkout <branch-name>' messes up the repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It stops in some intermediate state, and git still says that it is on the main branch, but 'git checkout' deletes files that were added only in the main branch,

'git reset --hard HEAD' fixes the main branch, bit now it is impossible to switch to the other branch because it says that "some files would be overwritten", which shouldn't be the case.


All operations should be atomic.

When the user presses Ctrl-C, the correct action would be to cleanly return to the initial branch.


git-2.41.0


Thanks,

Yuri





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux