Getting Started with Git

Source: Internet
Author: User

I'm going to attach my github address:Http://github.com/redknotmiaoyuqiao

Git is the version controller used to manage project code.

Git init

Repository also known as the Warehouse, English name repository, you can easily understand a directory, all the files in this directory can be managed by git, each file modification, deletion, git can track, so that any moment can be traced to the history, or at some point in the future can be "restored."

Git add-a

Before submitting your modified files, you need to add them to the staging area. If the file is newly created, you can do this by adding the file to the staging area

git Add. , Git will recursively add all the files in the directory where you executed the command, so if you use the current working directory as a parameter, it will track all the files there.

Git commit-m "fisrt submit"

Performs a commit operation on all locally changed files, including locally modified and deleted files, but does not include files that are not tracked by the repository. But this command is best not to be used, which will throw away the greatest benefit of Git staging area to the user: the ability to control the content submitted

Git push-u Origin Master

Used to push updates to the local branch to the remote host. If you omit the remote branch name, it means that the local branch is pushed to the remote branch with which the trace relationship exists (usually the same name), and if the remote branch does not exist, it is created.

Getting Started with Git

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.