1. First create a library on Git to save the uploaded local files
2. Command git init to turn this directory into a repository that git can manage
Git init
3. Save a copy of the remote Git library to a local
git clone xxxxxxx
Example: Git clone https:///github.com/lucky-syw/practice.git //This link is available for see
Follow this step to see that you have cloned a remote git file to your local desktop
4. Drag the file you want to upload to a desktop cloned file
5. Go to the clone to local folder, add the contents of the folder to the repository, and use the command git Add. Add to staging area inside, don't forget the decimal point ".", meaning to add all the files under the folder
cd/users/administrator/desktop/git Add.
6. Use the command git commit to tell git to submit the file to the repository. In quotation marks for submission instructions
" First commit Lucky "
7, push the contents of the local library to the remote, using the git push command, actually pushes the current branch master to remote. After executing this command, you will be asked to enter a user name, password, and upload after verification.
Git push-u Origin Master
8. Use git log to view the commit record
git log
Finally, come up to see the specific operation:
9. Refresh git again to see that the uploaded file has been successfully
Recommend another blog: https://www.cnblogs.com/eedc/p/6168430.html
git----github to upload local files to git