One. Install Git version control software locally
Two. Configure GIT to set up user information
git config--global user.name "Jack"
git config--global user.email "[Email protected]"
git config--list get git configuration information
Note:The--global parameter of the git config command uses this parameter to indicate that all of your git repositories on this machine will use this configuration, but you can also specify a different user name and email address for a particular repository.
three. Git connect to remote repository GitHub
1. Generate the key locally based on the configuration account (User.Name)
command: ssh-keygen-t rsa-c "[email protected]"
2. Configure the key on GitHub
Log in to your GitHub account and add Sshkey in SSH keys (open the Id_rsa.pub file under the. ssh file to copy the key to GitHub)
3. Check if GitHub is linked
The authenticity of host ' github.com (192.30.252.131) ' can ' t be establis
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Direct Yes
Connection Successful!
Four. Local Remote Warehouse Association
1. Create a warehouse on GitHub
2. Create a warehouse locally
3. Local warehouses connect to remote warehouses
4. Remote Local warehouse synchronization
5. Modify the local commit remote
@1. adding files
@2. Adding files to the repository
The first step git add 0701.txt with the command git add to tell git to add files to the warehouse
The second step of Git commit-m ' first commit ' command git commit tells Git to commit the file to the repository,
After-m input is the description of this submission, you can enter any content, of course, it is good to make sense, so that you can easily from the history of records to find changes.
@3. Push local to remote
This is now committed to the remote
Frequently encountered problems
Git associated remote GitHub repository