Skip to content

Instantly share code, notes, and snippets.

@philip
Created April 11, 2009 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philip/93425 to your computer and use it in GitHub Desktop.
Save philip/93425 to your computer and use it in GitHub Desktop.
updating php.net info
One method for having a git repository recognize php.net cvs commits
as Github users is to change the author information. In this case,
add the php.net user information by running the following:
#!/bin/sh
git filter-branch --env-filter '
cn="$GIT_AUTHOR_NAME"
cm="$GIT_AUTHOR_NAME@php.net"
an="$GIT_COMMITTER_NAME"
am="$GIT_COMMITTER_NAME@php.net"
export GIT_AUTHOR_NAME=$an
export GIT_AUTHOR_EMAIL=$am
export GIT_COMMITTER_NAME=$cn
export GIT_COMMITTER_EMAIL=$cm
'
Notes:
- Ideally do it before importing to Github but if not then do this:
git push --force origin master
- Look into allowing php.net users to better customize this, and
certainly ask for Github admin advice before doing an official import
- This code was heavily inspired by this:
http://github.com/guides/change-author-details-in-commit-history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment