Common git commands

Source: Internet
Author: User
Tags git commands

1. Create a new library with git and submit a file

1 Touch readme.md  // This is the command to create a new file in the folder you want to native 2 git init         //  Initial session local library 3 It add readme.md  // adding files to the library 4 git commit-m "First commit"  // submit 5 git remote add origin [email protected]:username/pro.git  // set the server address for the new library origin is local alias 6 Git push-u origin master  // Item Server-side commit code

2. Pull code from server update to local

git initgit remote add origin1 [email protected]:username/pro1.gitgit pull Origin1

Common git commands

Related Article

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.