6

I'm using Intellij and command-line Git and we have problems with not seeing commits because Git defaults to not showing "uninteresting" changes.

For example, if Developer "A" changes something and pushes the change, then Developer "B" changes it back to the way it was (before "A"'s change) and pushes that change, those commits would not show in the history because they would cancel each other out (at least this is the way it's been explained to me.) This makes it hard to find problems and leads to a lot of "Where'd my change go?"

Ideally both Intellij and command-line would show full history, all commits, including merges, every time, by default.

Anyone know the settings to accomplish this in .gitconfig?

EDIT: The following section is from the git-log documentation and explains what I mean by "uninteresting changes"

Default mode Simplifies the history to the simplest history explaining the final state of the tree. Simplest because it prunes some side branches if the end result is the same (i.e. merging branches with the same content) --full-history Same as the default mode, but does not prune some history.

user3120173
  • 1,758
  • 7
  • 25
  • 39
  • What do you mean with "uninteresting changes"? – iltempo Jan 30 '14 at 18:20
  • 3
    How do you lose commits because of what you see in a log view? Git always shows all commits in every tool I've used. – asm Jan 30 '14 at 18:20
  • @AndrewMyers git-log excludes "uninteresting commits" by default, meaning commits that are treesame to a parent. See "History Simplification" in the documentation: https://www.kernel.org/pub/software/scm/git/docs/git-log.html – Edward Thomson Jan 30 '14 at 18:55
  • See if this works for you http://stackoverflow.com/questions/2500586/setting-git-default-flags-on-commands – Cole9350 Jan 30 '14 at 19:33

1 Answers1

5

To show full history with git log invoke it with the --sparse and --full-history switches.

--sparse

    All commits that are walked are included.

    Note that without --full-history, this still simplifies merges: if one of
    the parents is TREESAME, we follow only that one, so the other sides of the
    merge are never walked.

Note that there is no way to specify default flags for git commands so you will have to create an alias for your command line git use. I am not aware of IntelliJ supporting such setup for git log.

Community
  • 1
  • 1
mockinterface
  • 14,452
  • 5
  • 28
  • 49
  • That's unfortunate, but maybe someday this will be configurable in both command line and Intellij. – user3120173 Jan 31 '14 at 16:05
  • If you guys just scrolled down a little on the link you posted, you'd see that there is a way to specify default flags for git commands since version 1.7.6 – Cole9350 Jan 31 '14 at 16:21
  • @Cole9350 Please read the Q&A you refer to - the version 1.7.6 functionality is **specific for log.abbrevCommit and nothing else**. It isn't applicable to the switches discussed here. – mockinterface Jan 31 '14 at 21:39
  • @mockinterface Your post clearly reads "Note that there is no way to specify default flags for git commands so you will have to create an alias for your command line git use." Which you can agree is false, perhaps you should be more specific to the "commands" your referring to – Cole9350 Jan 31 '14 at 21:59
  • @Cole9350 If you wish to interpret my comment in the strict terms of first order logic, predicate calculus and existential quantification, you are free to do so. To me it is clear that having [a default flag hacked in](http://git.661346.n2.nabble.com/PATCH-v7-Add-log-abbrevCommit-config-variable-td6378803.html), entirely unrelated to this post, doesn't count as default flags support. – mockinterface Jan 31 '14 at 22:31