Created
June 6, 2012 20:53
-
-
Save pwenzel/2884698 to your computer and use it in GitHub Desktop.
Git Log to Tab-Delimited CSV File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local Dates: | |
git log --date=local --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.local.tsv.txt | |
# ISO Dates: | |
git log --date=iso --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.iso.tsv.txt |
@shahzebjiwani You can have the output directed to where ever you want you just have to put the correct file path in.
For one directory up you could do :
git log --date=local --pretty=format:"%h%x09%an%x09%ad%x09%s" > ../commits.local.tsv.txt
For an arbitary location, you just have to use an absolute path (home directory):
git log --date=local --pretty=format:"%h%x09%an%x09%ad%x09%s" > /home/username/commits.local.tsv.txt
Or for csv (which opens correctly in Excel):
git log --date=iso --pretty=format:'"%h","%an","%ad","%s"'
I especially like this one!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there a way to save this into a folder outside of the local git folder?