Git log outputs in a specific revision range

A revision is specified by its SHA1 hash. If you want to see commits for specific files, you have to separate paths with –: git log oldhash..newhash — path/to/inspect does this. Also note that you are using three dots (…) to specify the range. Usually, you only want two dots. Three dots might not give … Read more

How to understand git log –graph

With Git 2.25 (Q1 2020), The implementation of “git log –graph” got refactored and then its output got simplified. That in turn can fix the color for some cases. The following provides an illustration on how colors and edges are managed with git log –graph. See commit d784d97 (12 Nov 2019) by Denton Liu (Denton-L). … Read more

How to get Git log with short stat in one line?

git log –oneline –pretty=”@%h” –stat |grep -v \| | tr “\n” ” ” | tr “@” “\n” This will show something like this: a596f1e 1 file changed, 6 insertions(+), 3 deletions(-) 4a9a4a1 1 file changed, 6 deletions(-) b8325fd 1 file changed, 65 insertions(+), 4 deletions(-) 968ef81 1 file changed, 4 insertions(+), 5 deletions(-)

tech