How can you check the commit history in Git?

0251

You can check the commit history in Git by using the git log command. Here’s how to do it:

  1. Open your terminal.

  2. Navigate to your Git repository directory.

  3. Run the following command:

    git log

This will display a list of commits in reverse chronological order, showing the commit hash, author, date, and commit message.

For a more concise view, you can use:

git log --oneline

This will show each commit on a single line, displaying the commit hash and the commit message.

0 Comments

no data
Be the first to share your comment!