Git head :
- The HEAD points to the last commit in the current checkout branch. It is like a pointer to any reference.
- The HEAD can be understood as the “current branch.” When you switch branches with ‘checkout,’ the HEAD is transferred to the new branch.
- To check the Current pointing to which commit we can user the below command
git log –oneline |
Git log :
- Git log command shows the history of file changes in the git repository
- it saves on basic of commits created with time lienier manner
- We can list them using git log command
To See/view all commits with full info | git log |
To see/view list of commits with one line info (Response of commits New to old) | git log –oneline |
(i) git log :
- To See/view all commits with full info
git log |
(ii) git log –oneline :
- When we run git log –oneline, we can see the list of commits
git log –oneline |
Git reflog :
- To view how many times head pointed moved
- Indicates commit history
- Indicates reset history
git reflog |