git----github to upload local files to git

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.