How do you put your complete project on GitHub? just like a person who loves someone, It's really simple ...
The first step is to create a secret key on GitHub: How do you create it? as follows:
Click Settings (Settings) on the right small icon on the GitHub home page, and then click on the Settings screen: SSH and GPG keys will enter the Settings key page;
Then click New SSH key to create the key: the title value is filled in, key is filled with the key you obtained
The second step is to get the secret key: get the secret key before you install Git: ( can be under the official website, of course, you are more lazy words can also be taken from my Baidu Cloud )
Link: https://pan.baidu.com/s/1vzC2XgL9rbmAXrya78c26w password:hlpg
Assuming you've already installed Git, just right-click Git Base here on your desktop and enter the command to get the secret key from the small black window.
Before generating the secret key, you can configure your user name and email address as follows:
Configure user name: $ git config--global user.name "username"
To Configure a mailbox: $ git config--global user.email "Mailbox"
then generate the secret key: $ ssh-keygen-t RSA
To view the key : $ cat ~/.ssh/id_rsa.pub
Once you get it, you can copy the key you've acquired to GitHub! Note: in the small black window do not use shortcut keys copy and paste, friendly tips (right click)!
The third step is to create a repository in GitHub:
Go back to the GitHub home page and click on the lower left corner to change to New repository into the Create repository page;
name by the way, have a public (open/free) and private (private/chargeable), see your own needs, then click Create repository Create a repository;
The fourth step starts to actually start uploading the project: The next action is performed in the small black window: The Small black window in your project folder right-click on git Base here to open! The next operation is performed in a small black window
1. Initialize the warehouse: git init in the repository after the initialization of the folder will be more than a hidden file . Git file, if not, you can click on the Organize button on the left side of the folder then pick thefolder and search optionsClickShow All Files
2, View configuration information: git Config--list If you've configured the information before, you can see it, and if you don't see it, you can reconfigure it (for the configuration user name and the configuration mailbox above)
3, Add a workspace file to the buffer: git add < filename >
4, view file status: git status no requirement, This step you can not execute
< Span style= "font-size:13px" > 5, add buffer files to the repository: Span style= "color: #ff00ff; font-size:16px ">git commit-m"
6, view submitted logs: < Span style= "COLOR: #339966" >git log < Span style= "font-size:16px" > no requirement, This step you can not execute
7, see where the file is most recent: git diff < filename" Red is at the end of the previous repository, not required, this step you can not execute
8. Version fallback: There are many ways to see your preferences. All right then of course this step you can not execute
git reset--hard head^ return to previous version
git reset--hard head^^ Return to the first version
git reset--hard head~n return to nth version, n can only be an integer yo
git reset--hard version number you can first use git reflog View the version number, then paste the version behind it.
9, associating files with GitHub repositories: git Remote Add Origin repository address repository address in your created repository will show (with an HTTPS and an SSH two address, copy the SSH-generated address), save the address for example: [email protected]:shizhibiao/ Xiaomi.git this format;
10. Submit to GitHub: after git push-u origin master commits, your project appears on GitHub's repository, so be happy! Hehe, don't hurry up and have a praise!
This is just uploading your project to GitHub and, of course, updating a process that takes a project from GitHub and creates a branching action project, so stay tuned!
Upload your project to GitHub using Git