Color in git-log

As of git 1.8.3 (May 24, 2013), you can use %C(auto) to decorate %d in the format string of git log. From the release notes: * “git log –format” specifier learned %C(auto) token that tells Git to use color when interpolating %d (decoration), %h (short commit object name), etc. for terminal output.)

How to find commit when line was deleted/removed?

git log -c -S’missingtext’ /path/to/file git log doesn’t show a diff for merge commits by default. Try the -c or –cc flags. More discussion/explanation: https://git-scm.com/docs/git-log nabble.com From the git-log docs: -c With this option, diff output for a merge commit shows the differences from each of the parents to the merge result simultaneously instead of … Read more

View git log without merge commits

use git log –author=<name> –no-merges Additionally the –first-parent option may give useful result for you: –first-parent Follow only the first parent commit upon seeing a merge commit. This option can give a better overview when viewing the evolution of a particular topic branch, because merges into a topic branch tend to be only about adjusting … Read more

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

TL;DR Use git log <branch> where <branch> is the name of the branch of interest. From the git-log man-page… A simplified version of the git-log synopsis given in that command’s man page is git log [<revision range>] Further down, you can find the following passage: When no <revision range> is specified, it defaults to HEAD … Read more

How can I view file history in Git?

Use git log to view the commit history. Each commit has an associated revision specifier that is a hash key (e.g. 14b8d0982044b0c49f7a855e396206ee65c0e787 and b410ad4619d296f9d37f0db3d0ff5b9066838b39). To view the difference between two different commits, use git diff with the first few characters of the revision specifiers of both commits, like so: # diff between commits 14b8… and … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)