SAGARFIVE

1. Introduction

2. Git Basics

3.  Git Terminology

4.  Git Branching

5.  Git - Github

6.  Git Add (Git staging)

7.  Git Commit

8.  Github Advanced

9.  Git Remote

3.9 Git Head, Git Log and Git Reflog

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 infogit 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