How to understand the graph output of `git log --all --graph --oneline --decorate`?
On startup git log --all --graph --oneline --decorate
, what does the text in parentheses after the commit names mean?
for example
What do the colors (blue, green, red and yellow) used to color the lines mean? Any other colors you can use that aren't shown here?
What does it mean ->
?
What does /
between origin
and B...
either staging
mean or mean?
In the first line of output
- does it
HEAD -> B...
mean the HEAD of the branch isB...
pointing to a commit? - What does it mean
origin/B...
?
On the 5th line of output
- means
tag: 1...
something similar toHEAD -> B...
the first line? - what's
staging
in green? - What are those three comma-separated lines on this line, but only two on the first line?
On the 6th line of output
- Why is there only one line, less than the first and fifth lines?
Thank.
source to share
Its a huge amount of questions ^ _ ^.
bracket
The bracketed text indicates tags, branches, and a HEAD pointer, if any, and if your working directory is here. You change the HEAD pointer (your worker) every time you start git checkout SOMETHING
where something is a tag, branch, or just a commit hash.
colors
The color depends on the configuration of your terminal. I have the following colors:
- purple for bookmarks
- red for remote branches
- white bold for local branches and tags
- yellow for commit messages
in your image i see
- red for remote branches
- red for local branches
- Yellow bold for tags
- yellow for commit hashes
→
It's just a pointer. HEAD -> 45g24g42t
indicates that your HEAD (your working directory is at commit 45g24g42t.
Origin / blah
Every time you clone a project, you can see this:
* 3G245GV (HEAD -> 3G245GV, foo, origin/foo)
This means that your local branch foo
is at the same point on the remote branch foo
. Usually remotes are named origin
. If you do a commit, you can see something like this on your computer:
* G54G23F (HEAD -> G54G23F, foo)
* 3G245GV (origin/foo)
This means that your local branch is ahead of origin / foo. This means that you have to push your commits.
Thats all
Some of the questions are superfluous, but I'll improve this answer if necessary.
source to share