git-log

How does git log --since count?

邮差的信 提交于 2019-12-20 08:11:20
问题 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 2013 +0100 commit ab4a8387bc4d9bdb4f67212df77eb1fc3d8b6304 Date: Thu Jan 31 01:59:11 2013 +0100 commit a0b027beba2cd03571bb9475b9db9542f8efe990 Date: Thu Jan 31 01:50:38 2013 +0100 commit add77c8fe2ba9254c11b98e14facede3420dc51c Date: Thu Jan 31 01:48

How does git log --since count?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-20 08:11:12
问题 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 2013 +0100 commit ab4a8387bc4d9bdb4f67212df77eb1fc3d8b6304 Date: Thu Jan 31 01:59:11 2013 +0100 commit a0b027beba2cd03571bb9475b9db9542f8efe990 Date: Thu Jan 31 01:50:38 2013 +0100 commit add77c8fe2ba9254c11b98e14facede3420dc51c Date: Thu Jan 31 01:48

How to get ONLY filename with path using git log?

耗尽温柔 提交于 2019-12-20 00:49:06
问题 I used almost all git log commands yet i haven't found a best way to do this. I need only this - get only file name with path nothing else /path/filename.txt /path/anotherfile.ext ... ... My input is date FROM and TO to the git log command. Either git log gives developer-name or date or commit-number or something that i don't want with file names. How to get ONLY the file name with full path? 回答1: Use the --since and --until options to select the time range and then you can use UNIX pipes to

git log -L without diff

非 Y 不嫁゛ 提交于 2019-12-19 09:19:38
问题 I'm trying to use git log -L <start>,<end>:<filename> but I would like to have very limited output (actually just hashes). While --pretty prints the commit info in the format I want, I did not find a way to not display the diff... e.g. on linux-next what I tried is: git log --pretty=format:"%H" -s -L 70,70:./arch/x86/include/asm/irqflags.h where (according to the manpage) the -s is supposed to Supress the ouput of the diff, however the output is: $ git log --pretty=format:"%H" -s -L 70,70:.

What do line colors in git log --graph mean?

寵の児 提交于 2019-12-18 14:01:06
问题 I'm curious what do line colors mean in git log --graph ? Yes, I'm asking about lines | / \ which connect commits * at the left edge of console output. Question #1 Do these colors have some hidden meaning? Or do they are pseudo-randomly chosen? Question #2 Sometimes overlapped (but disconnected) lines have the same color. For example, see at the purple lines on the screenshot above: first line from a55 to e1c second line from 3c1 to 043 Is it possible to ask git to choose colors wisely to

Using path wildcards in git log

霸气de小男生 提交于 2019-12-18 13:21:52
问题 I have a file down deep in my git tree: $ git ls-files | grep /Expression.java sm/src/main/java/cl/utilities/sm/Expression.java I'd like to get a log of its activity without having to type the whole path. Basically I want this output: $ git log --oneline -2 sm/src/main/java/cl/utilities/sm/Expression.java 2718cdc cleaned up some warnings f30cf15 Added missing @Overrides ... but without having to type sm/src/main/java/cl/utilities/sm . I tried lots of things, but none of them worked: $ git log

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

☆樱花仙子☆ 提交于 2019-12-18 12:47:57
问题 Following command outputs following lines of text on console git log --pretty=format:"%h;%ai;%s" --shortstat ed6e0ab;2014-01-07 16:32:39 +0530;Foo 3 files changed, 14 insertions(+), 13 deletions(-) cdfbb10;2014-01-07 14:59:48 +0530;Bar 1 file changed, 21 insertions(+) 5fde3e1;2014-01-06 17:26:40 +0530;Merge Baz 772b277;2014-01-06 17:09:42 +0530;Qux 7 files changed, 72 insertions(+), 7 deletions(-) I'm interested in having above format to be displayed like this ed6e0ab;2014-01-07 16:32:39

git: list all files added/modified on a day (or week/month…)

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-17 23:21:26
问题 Given a period of time (e.g. a day, a week, a month), is it possible to list all files that were modified or added in this time? 回答1: I'd use diff to yield the file list directly, e.g: git diff --name-only "@{3 days ago}" "@{2 days ago}" changelog.txt newfile.txt In case you're curious which file got modified or added, use --name-status instead: git diff --name-status "@{3 days ago}" "@{2 days ago}" M changelog.txt A newfile.txt 回答2: Maybe this: git log --since="1 day ago" --name-only -

List git commits to master branch between two dates

瘦欲@ 提交于 2019-12-17 22:38:09
问题 How can i get a list of all the git commits done to the master branch between 2014-01-01 and 2014-06-30? I know git log will give me roughly this format (repeated for all commits): commit <hash> author: <author name> date: <date> <comment> But how can it be limited to selected dates and a one line per commit format? <hash> <author> <date> <hash> <author> <date> 回答1: $ git log --since "DEC 1 2014" --until "DEC 5 2014" --pretty=format:"%h %an %ad" This will give the format you want for the

How to view file history in Git?

走远了吗. 提交于 2019-12-17 17:23:56
问题 With Subversion I could use TortoiseSVN to view the history/log of a file. How can I do this with Git? Just looking for history record for a particular file, and then the ability to compare the different versions. 回答1: 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