1 GitIntroduction
What is Git? Git is currently the world's most advanced distributed version control System (no one). What are the characteristics of Git? Simply put: high-end atmosphere on the grade!.
2 GitComponent Installation
# yum–y Install git
3 ConfigurationGitWarehouse
due to the company's environmental needs, this document in accordance with the company environment configuration.
1. Configure access keys
# Ssh-keygen
2. Copy the client's key to the GIT server
# Ssh-copy-id
3. Create a git repository directory
# Mkdir/data/www/repos
4. Create a git repository
# Cd/data/www/repos
# git init--bare sample.git ( must be performed in the scheduled warehouse directory )
5. add allow access to users
# git config--global user.name "root"
4 Gitcommon commands for clients
1. Add
# git add file
2. Delete
# git rm file
3. Submit Changes
# git Commit–m " Memo info "
4. Submit
# git push
5. Update
# git Pull
6. Clone Warehouse
# git clone git access address and directory
7. View file status
# git status
8. Renaming files
# git mv file new file
9. View Log
# git log
10. Compare file differences
# git diff
11. Clone Library
You can use the following command to clone a code base because the production environment is sometimes required
# git clone--bare repos
This article is from "Xiao Huan" blog, please be sure to keep this source http://x1aoxiao.blog.51cto.com/1836651/1655748
Configuring Git under Linux CentOS