Questions tagged [git-log]

Shows the commit logs of a Git repo

git log shows the commit logs in Git repository.

You can view the commit history of a specific file with the following:

git log <filename>

git log provides a large number of options to filter and format the resulting output, see the documentation for full details.

Reference

$ git log --help
920 questions
230
votes
7 answers

What's the difference between git reflog and log?

The man page says that log shows the commit logs and reflog manages reflog information. What exactly is reflog information and what does it have that the log doesn't? The log seems far more detailed.
Noich
  • 14,631
  • 15
  • 62
  • 90
216
votes
4 answers

git log of a single revision

I have a commit c. I want to get the changeset of that exact commit c + metainformation and no other one. Is there a simpler way than git log -p c^..c to do that?
zedoo
  • 10,562
  • 12
  • 44
  • 55
202
votes
4 answers

How to configure 'git log' to show 'commit date'

How can I configure git log to show commit date instead of author date?
michael
  • 106,540
  • 116
  • 246
  • 346
186
votes
6 answers

How to get commit history for just one branch?

Let's say I created a new branch my_experiment from master and made several commits to my_experiment. If I do a git log when on my_experiment, I see the commits made to this branch, but also the commits made to master before the my_experiments…
Marplesoft
  • 6,030
  • 4
  • 38
  • 46
156
votes
10 answers

How can I view file history in Git?

With Subversion I could use TortoiseSVN to view the history/log of a file. How can I do this with Git? I am just looking for the history record for a particular file, and then the ability to compare the different versions.
mrblah
  • 99,669
  • 140
  • 310
  • 420
154
votes
3 answers

View git log without merge commits

I'm trying to view commits made by a specific user, and want to remove any merges done by the user from the output. How can I do so? I can check for the commits of a user using git log --author=, but can't remove the merge commits in the…
Anshul Goyal
  • 73,278
  • 37
  • 149
  • 186
152
votes
2 answers

How can I print the log for a branch other than the current one?

I'm on a branch with some changes. Changing branch is a pain as some files are locked by processes, so to change branch I'd have to stop all the processes which have locks, then stash the changes before checking out the other branch to see its…
BanksySan
  • 27,362
  • 33
  • 117
  • 216
146
votes
3 answers

How to find commit when line was deleted/removed?

I have a deleted line in a file in my Git repository. I knew some of the missing text, and the file that it was in, so I used git log -S'missingtext' /path/to/file. However, the only thing that came back was the commit in which I added the line…
matthewwithanm
  • 3,733
  • 2
  • 21
  • 27
132
votes
11 answers

How can I get the diff between all the commits that occurred between two dates with Git?

Or just all the commits that occurred between two dates? In SVN, you could do something like svn diff -r{date}:{date} to do it! I can't seem to find a Git equivalent to this. Specifically I'm looking at writing a script to send out daily emails…
Chris
  • 3,184
  • 4
  • 26
  • 24
116
votes
5 answers

Color in git-log

When you run git log --decorate --pretty=oneline the output will have entries like (HEAD, refs/published/master, master) with coloration. I also have the following in my gitconfig: [color "branch"] current = yellow reverse local = yellow …
NorthIsUp
  • 17,502
  • 9
  • 29
  • 35
116
votes
1 answer

How does git log --since count?

I have a simple test repository with just several commits and want to see the date&time filtered log: $ git log --author="automatix" --since="2013-01-30" --pretty -- test commit ea0719bef142659fa561c9d040b2120012ed0184 Date: Thu Jan 31 02:03:12…
automatix
  • 14,018
  • 26
  • 105
  • 230
115
votes
2 answers

How to read a Git log graph

In the Git community book, it says Another interesting thing you can do is visualize the commit graph with the '--graph' option, like so: $ git log --pretty=format:'%h : %s' --graph * 2d3acf9 : ignore errors from SIGCHLD on trap * 5e3ee11 :…
michael
  • 106,540
  • 116
  • 246
  • 346
113
votes
4 answers

Git: How to list commits on this branch but not from merged branches

Suppose your git commit history looks like this: A---B---C---D---E---F master \ / X---Y---Z topic Is it possible to have git list only the commits on master, A-F? In other words, if the commit was on a merged-in branch, I don't…
wch
  • 4,069
  • 2
  • 28
  • 36
111
votes
5 answers

Why might git log not show history for a moved file, and what can I do about it?

I've renamed a couple of files using git mv, used git stash, had a quick look at HEAD (without changing it) then did git stash pop to get the whole lot back again. My moves had disappeared from the commit list, so I redid them with git rm and the…
please delete me
107
votes
6 answers

Git log between tags

I'm trying to output the log between two tagged commits. mbell@cheetah [12:07:22] [/var/www/html/brone] [dev] -> % git tag…
digital
  • 2,079
  • 3
  • 25
  • 35
1
2
3
61 62