Advertisement
Guest User

Untitled

a guest
Mar 13th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. $ git config --global user.name "Firstname Lastname"Sets the name of the user for all git instances on the system
  2. $ git config --global user.email "your_email@youremail.com"
  3.  
  4. [core]
  5. repositoryformatversion = 0
  6. filemode = false
  7. bare = false
  8. logallrefupdates = true
  9. symlinks = false
  10. ignorecase = true
  11. hideDotFiles = dotGitOnly
  12. [remote "origin"]
  13. url = git@github.com:freeenergy/my-project.git
  14. fetch = +refs/heads/*:refs/remotes/origin/*
  15. [user]
  16. name = my name
  17. email = myEmail.com
  18.  
  19. [user]
  20. name = Bob Gilmore
  21. email = me@mydomain.com
  22.  
  23. $ git config user.email
  24. # you@there.com
  25.  
  26. $ git config --global user.email "me@here.com"
  27.  
  28. > git config --local -e
  29.  
  30. [user]
  31. name = Anna Kowalska
  32. email = anna.kowalska@wp.pl
  33.  
  34. #!/bin/sh
  35.  
  36. git filter-branch --env-filter '
  37. OLD_EMAIL="your-old-email@example.com"
  38. CORRECT_NAME="Your Correct Name"
  39. CORRECT_EMAIL="your-correct-email@example.com"
  40. if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
  41. then
  42. export GIT_COMMITTER_NAME="$CORRECT_NAME"
  43. export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL"
  44. fi
  45. if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ]
  46. then
  47. export GIT_AUTHOR_NAME="$CORRECT_NAME"
  48. export GIT_AUTHOR_EMAIL="$CORRECT_EMAIL"
  49. fi
  50. ' --tag-name-filter cat -- --branches --tags
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement