Git Log Explanation
git log --oneline
94ebf5f (HEAD -> ramukaka) ramukka
421b92c (tag: rel1.0, master) cherry2
8aa52e5 file10
2ba2c83 file9
cc0471f Revert "bad"
2c8439c bad
cd9fc7b good
61c4cfc (origin/master, origin/HEAD) adding other user
7062f9b all
3d0f845 file1
ba9fae7 Adding first commit
Explanation of Each Part
1. Commit Hash
- Each commit starts with a unique identifier called a commit hash (e.g.,
94ebf5f
). This is a shortened version of the full hash that uniquely identifies the commit.
2. References (Branches and Tags)
- Following the commit hash, you might see references like branches and tags:
HEAD -> ramukaka
: Indicates that theHEAD
is pointing to theramukaka
branch. TheHEAD
represents the current commit your working directory is pointing to.(tag: rel1.0, master)
: Indicates that this commit is tagged withrel1.0
and is also the tip of themaster
branch.(origin/master, origin/HEAD)
: Indicates that the commit is the latest commit in the remotemaster
branch and is also the default branch (HEAD
) of the remote repository.
3. Commit Message
- After the commit hash and references, you see the commit message (e.g.,
ramukka
,cherry2
,file10
). This message was provided by the user when the commit was created and typically describes the changes made in that commit.
Simplified Breakdown of Each Line
94ebf5f (HEAD -> ramukaka) ramukka
- Commit hash:
94ebf5f
- Current branch:
ramukaka
- Commit message:
ramukka
- Commit hash:
421b92c (tag: rel1.0, master) cherry2
- Commit hash:
421b92c
- Tag:
rel1.0
- Branch:
master
- Commit message:
cherry2
- Commit hash:
8aa52e5 file10
- Commit hash:
8aa52e5
- Commit message:
file10
- Commit hash:
2ba2c83 file9
- Commit hash:
2ba2c83
- Commit message:
file9
- Commit hash:
cc0471f Revert "bad"
- Commit hash:
cc0471f
- Commit message:
Revert "bad"
- This indicates a commit that reverts a previous commit with the message
"bad"
.
- Commit hash:
2c8439c bad
- Commit hash:
2c8439c
- Commit message:
bad
- Commit hash:
cd9fc7b good
- Commit hash:
cd9fc7b
- Commit message:
good
- Commit hash:
61c4cfc (origin/master, origin/HEAD) adding other user
- Commit hash:
61c4cfc
- Remote branch:
origin/master
- Remote HEAD:
origin/HEAD
- Commit message:
adding other user
- Commit hash:
7062f9b all
- Commit hash:
7062f9b
- Commit message:
all
- Commit hash:
3d0f845 file1
- Commit hash:
3d0f845
- Commit message:
file1
- Commit hash:
ba9fae7 Adding first commit
- Commit hash:
ba9fae7
- Commit message:
Adding first commit
- Commit hash:
Summary
The git log --oneline
command provides a concise view of the commit history. Each line includes:
- A shortened commit hash
- Any relevant references (branches or tags)
- The commit message