The park has been opened for several months, has not applied for their own blog, usually also look at the technical articles Daniel. These days encountered a few problems, think of the park friends may also encounter, simply to share their own problems, one can help the park friends, and secondly can also give themselves a deeper impression. This is the first blog I wrote, what is not in place also invites the garden friends can put forward valuable suggestions, to improve, overland here first thanked.
This operation needs to use the management tool git,:https://git-scm.com/
Once installed, open the project folder you want to upload, right-click on the Windows system select Git Bash here
The transfer between 1.git and GitHub is encrypted via SSH, so the first step is to generate one locally. SSH (there is not much explanation for the GitHub registration steps here).
1) First check if there is a. ssh file on the local, and some delete it.
$ CD ~/.ssh
2) Enter the command, generate. SSH, write your own mailbox
Ssh-keygen "Your email @.com "
You can go straight to the carriage
This means that a. ssh file will be generated at the root of the user directory in the C drive, and if you can't find it, you can search for it, and there will be Id_rsa and Id_rsa.pug files under the file.
3) In order to avoid errors when creating a connection with GitHub, you can create a new config file and copy the following code in
Host github.com User git ssh. github.com preferredauthentications publickey ~/. SSH/id_rsa 443
2. Add a public key to GitHub
1) Copy the contents of the Id_rsa.pug to the specified location
2) test the connection is successful, indicating successful access
ssh -t [email protected]
3. Uploading a project
1) Create git config file, you will find a. git file under your file, default is hidden file
$ git init
2) Add all current files to GitHub
$ git Add.
3) Confirm Add
" First commit "
4) Execute the command, and copy back the generated on your GitHub
$ git Remote add origin [email protected]:heshaui/pdfjsdemo.git
May be wrong
Workaround:
First enter: $ git Remote RM origin
Re-enter: $ git Remote add origin [email protected]:heshaui/pdfjsdemo.git
5) Execute last command
$ Git push-u Origin Master
So the project was uploaded successfully.
How to upload a local project to GitHub