Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. How To Install Git Using Yum
  2.  
  3. As is the case with most Linux distributions, git is available from CentOS's default repositories. We can install the package maintainer's most recent version with:
  4.  
  5. sudo yum install git
  6.  
  7.  
  8. How To Set Up Git
  9.  
  10. When you commit changes with git, it embeds your name and email address into the commit message in order to easily track changes.
  11.  
  12. If we do not configure this information ourselves, git may try to guess these values (probably incorrectly) by using your Linux username and hostname.
  13.  
  14. Give git the values you wish to use for these parameters with these commands:
  15.  
  16. git config --global user.name "Your Name Here"
  17. git config --global user.email "your_email@example.com"
  18.  
  19. The configuration changes will be stored in a file in your home directory. You can see them with a normal text editor:
  20.  
  21. nano ~/.gitconfig
  22.  
  23. [user]
  24. name = Your Name Here
  25. email = your_email@example.com
  26.  
  27. You can also view this information by querying git itself for the current configuration settings:
  28.  
  29. git config --list
  30.  
  31. user.name=Your Name Here
  32. user.email=your_email@example.com
  33.  
  34. As mentioned earlier, if you forget to set up these steps, git may try to fill in these values automatically:
  35.  
  36. [master 0d9d21d] initial project version
  37. Committer: root
  38. Your name and email address were configured automatically based
  39. on your username and hostname. Please check that they are accurate.
  40. You can suppress this message by setting them explicitly:
  41.  
  42. git config --global user.name "Your Name"
  43. git config --global user.email you@example.com
  44.  
  45. After doing this, you may fix the identity used for this commit with:
  46.  
  47. git commit --amend --reset-author
  48.  
  49. Depending on your version of git, it may fail entirely:
  50.  
  51. git commit
  52.  
  53. *** Please tell me who you are.
  54.  
  55. Run
  56.  
  57. git config --global user.email "you@example.com"
  58. git config --global user.name "Your Name"
  59.  
  60. to set your account's default identity.
  61. Omit --global to set the identity only in this repository.
  62.  
  63. fatal: empty ident name (for ) not allowed
  64.  
  65. As you can see, git is very good about telling you exactly what you should be doing.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement