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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With