git-whatchanged:tldr:c926c
The "git whatchanged" command is used to display a list of commits along with the changes made in each commit. It shows a summarized view of the commit history, including the commit hash, author, date, and commit message.
Here is an example output of the "git whatchanged" command:
commit 1a2b3c4d5e6f7g8h9i0j
Author: John Doe <john.doe@example.com>
Date: Tue Sep 21 12:34:56 2021 +0300
Updated README.md
diff --git a/README.md b/README.md
index 12345678..abcdefgh 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,4 @@
# Sample Repository
Example repository for demonstrating Git commands.
+
commit 2b3c4d5e6f7g8h9i0j1a
Author: Jane Smith <jane.smith@example.com>
Date: Mon Sep 20 09:08:07 2021 +0300
Added new feature
diff --git a/main.py b/main.py
index 98765432..zyxwvuts 100644
--- a/main.py
+++ b/main.py
@@ -10,3 +10,6 @@ def some_function():
# code here
+# new feature added
+def new_feature():
+ # implementation
In this example, there are two commits displayed. The first commit (1a2b3c4d5e6f7g8h9i0j) shows that the README.md file was updated. The changes made to the file are displayed in the "diff" section, showing the added line.
The second commit (2b3c4d5e6f7g8h9i0j1a) indicates that a new feature was added to the main.py file. Again, the changes made to the file are shown in the "diff" section, highlighting the added function.
Overall, the "git whatchanged" command is helpful for getting an overview of the commit history and the changes introduced in each commit.