I'm using the "Github For Windows" shell and was trying to commit something and came across what looks like an error:
C:\Path\Name\ [master +2 ~1 -0 !]>
What does +2 ~1 -0 !
mean?
NOTE: I fixed the error by modifing every file in the directory and re commiting and pushing, now it's just [master]
, but I still don't understand the numbers.
This is not an error, just some helpful information.
I suppose you are using Github For Windows
- it uses posh-git by default, and the prompt is explained in the README of posh-git
itself:
+ = Added files
~ = Modified files
- = Removed files
! = Conflicted files
Go through the README and you can see how it relates to the git status
output.
That prompt probably meant:
In your current git branch - master
, you had added two files +2
, modified one ~1
and removed zero -0
.
!
signifies you are currently at the root of the repository. Check this comment for more info.
Not sure which shell you are using - But you may want to check the PROMPT
and PS1
environment variables to find what those items mean in your prompt.
The prompt got reset to just [master]
- once you had committed all the changes, as you mentioned in your questions.
PROMPT
environment variable is the one used by the windows shell cmd
, and PS1
is used by unixy shells - like bash.
Edit: Totally missed the powershell
tag you put in there - I'm not a windows guy - but looks like in powershell you create a prompt
function - check this link: http://www.johndcook.com/blog/2008/05/12/customizing-the-powershell-command-prompt/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.