Introduction to Git
George Boorman
Curriculum Manager, DataCamp
We can restrict the number of commits displayed using -
:
Restrict to the 3
most recent commits
git log -3
git log report.md
cd data
git log -2 mental_health_survey.csv
commit f35b9487c063d3facc853c1789b0b77087a859fa
Author: Rep Loop <[email protected]>
Date: Fri Jul 26 15:14:32 2024 +0000
Add two new participants' data.
commit 7f71eadea60bf38f53c8696d23f8314d85342aaf
Author: Rep Loop <[email protected]>
Date: Fri Jul 19 09:58:21 2024 +0000
Adding fresh data for the survey.
git log
by date:git log --since='Month Day Year'
git log --since='Apr 2 2024'
git log --since='Apr 2 2024' --until='Apr 11 2024'
"2 weeks ago"
"3 months ago"
"yesterday"
"07-15-2024"
"YYYY-MM-DD"
12-06-2024
could be 6th Dec
or 12th June
!"15 Jul 2024"
or "15 July 2024"
"15 Jul, 2024"
git log
hash
git show c27fa856
Introduction to Git