Git: An advanced Distributed version control system, an open source Distributed version Control tool.
git installation
Under Windows operating system, Access githttps://git-for-windows.github.io/
Sign in to the GitHub website and we recommend configuring SSH keys to connect to GitHub, which has been configured to skip
Configure Git
(1) Create SSH key locally: $ ssh-keygen-t rsa-c "[email protected]"
The following [email protected] changed to your mailbox, then asked to confirm the path and enter the password, we use the default all the way to the line. Successful words will be generated under ~/. SSH folder, go in, open id_rsa.pub, copy the key inside. Go back to GitHub, go to account Settings, choose SSH keys,add ssh key,title on the left, and paste the Key.
(2) In order to verify success, enter it under GIT bash:
$ ssh-t [email protected]
If it is the first time will prompt whether continue, enter Yes will see: You ' ve successfully authenticated, but GitHub does not provide shell access. This means that you have successfully connected to GitHub.
Submit steps:
1. Create a local code warehouse
Open git Bash
Configure your identity first so that you can know who submitted it when you commit the code
Enter git config--global user.name "name"
git config--global user.email "email address"
CD into the current file directory, enter git init can be created ~
Then use Ls-al Query code warehouse, if you want to delete this warehouse, directly from the directory to delete this folder can be.
2. Submit Local Code
Once the warehouse is established, the local code can be submitted, only two commands are needed, add and commit
git Add. is to submit all
git add + filename is a single file submission
Git commit-m "First commit" is submitted here to be appended after the-m parameter must be appended with the commit parameter.
3. Hosting local code, synchronizing
Log on to the GitHub website, click New Repository, add some information, click the Create Repository button, then display your Repository home page, then get the address of the remote repository (click the right clone or Dowmload button), copy it down.
Then open Gitbash.
Switch to the project directory, clone the remote repository to a local, git clone repository address
Sometimes the transfer time-out is: Just try it a few more times.
At this time, your project directory will have a folder with the same name, all the directories in this folder will be copied to the previous level of the directory, you can add the entire project to version control (will be remote and local synchronization)
Here's a hidden. git file, don't miss out!!!
After copying, you can delete the new directory, then ls-al view the project catalog
4. Then it's submitted to GitHub.
Execute the commit operation first (add,commit), then enter the GIT push Origin master synchronization
Note here to remember to enter the user name and password for identity validation!
The process may be slow, wait patiently
Now refresh GitHub on the HelloWorld Project version homepage and upload it successfully.
My github address: https://github.com/freeah/like the point of a good yo!
git--Novice and upload project to remote warehouse GitHub