"fatal: not a git repository" -> exit status 0 on Windows.

37 views
Skip to first unread message

Ubaldo Tiberi

unread,
Feb 6, 2025, 4:43:54 AMFeb 6
to git-for-windows
I am not sure if that is done on purpose but I found it a bit confusing.
When running a git command from a non-git repo I get the message:

"fatal: not a git repository (or any of the parent directories): .git"

as expected, but then $LASTEXITCODE return 0. I would expect a non-zero value. 
Is that something done on purpose? 
Reply all
Reply to author
Forward
0 new messages