I am currently using Git Bash to clone a large repository that has over 100,000 commits. The cloning process has been going on for over half an hour, and it still hasn't finished receiving objects.
Is it possible to cancel a git clone
command from Git Bash?
(For reference, I am using Git 2.17.0 (64 bit) on Windows 7 Professional).
Ctrl+C should send a SIGINT or similar (signal for graceful exit) to the git process; if this does not help you can issue a SIGQUIT with Ctrl+\; last but not least you can always kill the process using the Windows Task Manager.
The directory you're cloning into may not be in a consistent state as a result of killing the git executable so you may wish to delete it before attempting to clone again, if git doesn't do so for you. When you try again, you can use the flag --depth=N
to fetch only the last N commits.