mirror of
https://github.com/Sosokker/first-contributions.git
synced 2025-12-19 21:24:08 +01:00
790 B
790 B
Check commit log
In order to check commit log for a branch, or, a file, following command can be used:
git log [options] [path]
The output of this command is given in reverse chronological order by default.
Command variations and options
- In order to log the commits reachable from a particular commit ids: (In this case,
fooandbar)
git log foo bar - It is also possible to remove the commits reachable from a given commit id by adding a
^in front of commit id: (In this case,baz)
git log foo bar ^baz - Commit log for a particular file
git log --all <filename> - Limit number of commits in log (In this case,
5)
git log -n 5