" Mean when using the Git command line? After several Git commands, I found that my command line tooltip ...">

What does the prompt "[master +1 ~ 0 -0!]>" Mean when using the Git command line?

After several Git commands, I found that my command line tooltip has changed from

[master]> 

to

 [master +1 ~0 -0 !]> 

What does it mean?

+6
source share
3 answers

This is the number of files:

  • added ( + )
  • changed ( ~ )
  • deleted ( - )
  • conflict ( ! ) (from alisa answer )

You can see the version of this command line version .

powershell prompt

Those represent the status before commit (added funds are added to the index or "delivered")

Here is a more complete version of this invitation, which also displays the number of commits in front of or behind the upstream repository .

commit ahead

When you make some changes and commit them, your state should be 1 commit before the remote. It is very useful to know how many commits you refused.

+10
source

and

  • Conflicts (!)

Usually there is no conflict, but sometimes it happens (for example, when a file changes both in your local repository and in the online repository, and you want to pull. Thus, Git does not know which one should be saved),

In these cases, you must manually and save the conflicting file (which is already marked by Github showing the conflicting lines).

+4
source

Since you have a conflict (!). Type: git status - find out which folder has a conflict.

0
source

Source: https://habr.com/ru/post/951935/


All Articles