How to upload a local project to git,git with commands basic usage

Source: Internet
Author: User

1, (first into the project folder) by command git init to turn this directory into a repository that git can manage

Git init

2. Add the file to the repository, using the command git Add. Add to staging area inside, don't forget the decimal point ".", meaning to add all the files under the folder

git Add.

3. Use the command git commit to tell git to submit the file to the repository. In quotation marks for submission instructions

Git commit-m ' first commit '

4. Associating to remote libraries

Git remote add origin your repository address

Such as:

Git remote add Origin https://github.com/cade8800/ionic-demo.git

5, get the remote library with the local synchronization merge update, update, (if the remote library is not empty must do this step, or the subsequent commit will fail)

Git pull--rebase Origin master

6, 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

*, status Query command

git status

Please refer to http://www.cnblogs.com/tugenhua0707/p/4050072.html for details.

How to upload a local project to git,git with commands basic usage

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.