git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"'

Set GIT_COMMITTER_DATE = GIT_AUTHOR_DATE for all the git commits


1
2012-12-05 14:54:46

These Might Interest You

  • My script lists all users & the number of commits they made in the period, sorted alphabetically. To sort by number of commits, append a '|sort' to the end of the command. The script depends on the output format of svn log - original command didn't work for me because the string 'user' was not appearing in my output


    0
    svn log -r{2011-08-01}:HEAD|awk '$14 ~/line/ {print $3}'|sort|uniq -c
    sangnoir · 2011-09-01 07:58:54 0
  • A great command to assign to an alias, allowing you to git diff the last two commits in git.


    1
    git diff $(git log --pretty=format:%h -2 --reverse | tr "\n" " ")
    caffeinewriter · 2015-07-07 17:50:50 1
  • Outputs a quick summary of the svn commits for a user over a date range with the detail revision logs including comments and files affected. Useful for searching for a particular change or reporting by user. Show Sample Output


    1
    for i in `svn log -r{2011-02-01}:HEAD | awk '$3 == "user" {print $1}'`; do svn log -v -$i;done
    vijayphadke · 2011-03-04 17:11:22 0
  • Use this command to find out a list of committers sorted by the frequency of commits. Show Sample Output


    26
    svn log -q|grep "|"|awk "{print \$3}"|sort|uniq -c|sort -nr
    psytek · 2009-02-17 21:37:03 1
  • Given a file with the format of 'git log --pretty=short', search in last 100 commits for one with the same description. I used this when after a rebase I had to find out the new commit ids. The second sed replaces all special characters with dots so they don't mess up the grep later on. Show Sample Output


    0
    cat /tmp/commit_list | { while read old_commit ; do msg="`git log --pretty=oneline $old_commit'^'..$old_commit | sed 's/[0-9a-f]* //' | sed 's/[^A-Za-z0-9]/./g'`"; git log --pretty=oneline HEAD@'{100}'..HEAD | grep "$msg" ; done ; }
    plexus · 2012-10-11 11:06:40 0
  • Creating feature-branches off master, and trying to merge them in an integration branch (preview), sometimes causes conflicts because the feature-branch might hold changes from 'master' that aren't on preview yet. So this ensures only the commits added to the feature-branch are moved to integration (preview). Note: This assumes you're currently on the feature-branch. Adjust 'master/preview' branch names to suit your environment.


    -2
    git rev-list --reverse --topo-order master... | while read rev; do git checkout preview; git cherry-pick $rev || break; done
    shadyvb · 2015-04-23 14:28:06 1

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: