How to upload a local project on GitHub

Source: Internet
Author: User

GitHub How to upload a local project

It used to be on a directory on its own disk, and then open git bash to push some local files onto remote GitHub.

Previous method steps:

1. A new library on GitHub and a series of related steps appear on the GitHub site interface.

2. Then go to your local disk and go to the directory where you want to upload to the remote, right-click->git Bash.

3. Then follow the steps above on GitHub:

I used to be like this, can pass up smoothly, but today do not know how, always wrong.

I Baidu a lot of methods, and finally reset the SSH key, but still does not work.

Finally, I finally asked the studio of a senior-soldier brother, I just know that my previous methods are wrong, but do not know why still can pass up.

now the method: in order to better manage, build a dedicated on your own disk to commit to the GitHub on the folder, take a name GitHub In order to better manage these files.

1. Create a new warehouse on the GitHub remote repository test
2.

and copy this SSH address.

3. Then go to the GitHub folder, right-->git bash, enter the git clone SSH address on the command line (this will then clone the remote repository locally, and in the Gtihub folder there will be a folder with the same name as the remote repository test)

4. Put the file you want to upload to the remote repository, for example, the front-end. txt, and put it in the folder test you just cloned.

5. In this directory, right-->gitbash, on the command line, enter git add "file name (such as front-end. txt)", here is a small note: If the test folder is modified, then use Git add-a will be modified after the latest file pushed up.

6. Enter Gitpush origin master again on the command line

So in the remote warehouse above, will appear just the file "front-end. txt", so that there is a local folder, specifically for the management of files, remote also have files. If you want to modify it locally, you can push it to the remote.

How to upload a local project on GitHub

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.