Advertisement
Guest User

Untitled

a guest
Jul 30th, 2015
267
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. ## Make sure your local repo settings are correct
  2. git config --local --list
  3. git config --local user.name "author name"
  4. git confit --local user.email "name@example.com"
  5.  
  6. ## Change previous n commits
  7. git rebase -i HEAD~n
  8. # choose the commits to change by adding 'pick' or 'reword' (only for changing the message)
  9. git commit --amend --author="Author Name <email@address.com>"
  10.  
  11. ## Change all commits with --commit-filter. If your local config was wrong
  12. git filter-branch --commit-filter 'if [ "$GIT_AUTHOR_NAME" = "your previous name" ];
  13. then export GIT_AUTHOR_NAME="your New Name"; export GIT_AUTHOR_EMAIL=new.email@example.com;
  14. export GIT_COMMITTER_NAME="your New Name"; export GIT_COMMITTER_EMAIL=new.email@example.com
  15. fi; git commit-tree "$@"'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement