Uploading local items to GitHub
I was recently working on a project with a small, horse -named Little Tramp, because I was apart with him and thought about using GitHub.
This article records the issues encountered during the uploading of the project, although it is a small problem, but it is necessary to record a bit.
First, create a GitHub account, not described here
Second, create a warehouse, get the address of the warehouse, for example: [email protected]: User name/warehouse name. Git
third , create a good warehouse, you can put things inside, first, we need to download a local git, the installation process is no longer described here
The GIT configuration and the GitHub SSH key configuration are as follows:
' Your name ' 'your email' ssh-keygen -t RSA
return all the way to generate the public key
Copy the generated public key to GitHub user settings
Use cat ~/.ssh/id_rsa.pub to view, copy public key content
Web login github, click on Avatar--->settings--->ssh and GPC keys--->new SSH key, name it, then copy the public key in
You can then test whether the connection was successful
Ssh
Something appears to indicate success
Enter the local project directory, right mouse button---> Git Bash here, go to command line interface input command
" Commit Test " git remote add origin [email protected]: User name /repository name. Git
If you now attempt to use Git push-u origin master to upload the current branch code to the Master branch, you will get an error, such as
The main reason for the error is that the readme.md file in GitHub is not in the local code directory
You can merge code with the following commands (note: pull=fetch+merge)
Git pull--rebase Origin master
This is what you will find in your folder there is a readme.md file, then upload
Git push-u Origin Master
Done!
Note : Files larger than 4M, then you will not succeed, will error
FATAL:SHA1 file ' <stdout> ' write Error:broken pipeib/s
You can use the command to increase the limit
52428800
When you're done, you can log in to GitHub to view the items you've uploaded.
END.
Uploading items to GitHub