# 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 |
thanks! just what I needed
and if you had to do it for severals repo :
# for each repo
git log --date=local --pretty=format:"%h%x09%an%x09%ad%x09%s" > ~/commits.local-<REPO_NAME>.tsv.txt
# then to have them in a single file :
cat ~/commits.local-* > ~/all-repos-commits.tsv.txt
Or for csv (which opens correctly in Excel): git log --date=iso --pretty=format:'"%h","%an","%ad","%s"'
Nice one cheers!
Is there a way to save this into a folder outside of the local git folder?
@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!!
Originally borrowed from http://blog.edgeyo.com/2012/02/git-log-in-calendar-view/