Recently in the play GitHub this base friend platform, here to do a summary, easy to consult later, you can also give users a reference.
One: Register your github account and download git.
Second: Create a new warehouse on GitHub, point + and click New Repository, give your warehouse a name, mine is test.
Three: Install git, I install the Win64 version, directly decompression installation is good. Find a folder on your local disk as your local repository, choose git Bash here, switch to the/e/te directory, enter git init initialization, and find a more. git folder in the directory.
Quad: Configure SSH key value
git config--global user.name "username", git config--global user.email "email address" in git command line.
On the git command line, enter the command: CD ~/.ssh, to detect if a key has been generated, there is no key generated, there will be relevant information prompts, and then enter the command: ssh-keygen-t rsa-c "email Address", press ENTER, and then according to the information returned, Find the two files in the. SSH directory;
On GitHub Click "Setting", find the Add SSH key menu, and then added SSH key, the file id_rsa.pub inside the contents of all copied to the key edit box, title can be arbitrarily named, Save finished;
In the git command line input: ssh-t [email protected], here will ask you to enter the SSH key password, if you just generated SSH key did not enter the password, the password is empty; and then see the message:
Error:hi User name! You've successfully authenticated,but GitHub does not provide shell access.; Description configuration succeeded;
Login to GitHub to view the SSH key just entered, now the color of the icon turns green, the key configuration is valid; Now you can do git on the git command line;
Five: Upload local project to warehouse
(1) Remote repository $ git Remote add origin [email Protected]:yourname/yourrepo.gitwison. Yourname is your username, Yourrepo.gitwison is the warehouse where you want to upload the project.
(2) Add the file you want to upload, git Add. On behalf of all files in the upload directory, you can add the files that you want added after git add, such as git add aa.html
(3) Submit project, enter Git commit-a-M "Wison" Wison is tagged who uploads. Then enter GIT push Origin master, you're done, you can view the project on GitHub
Six: Update the project, first add files, then submit, update before the best Git pull Origin Master Update your local project, because there may be someone else did the update
Use git to upload local items to GitHub and update