Git Learning notes--a NB Distributed version control system

Source: Internet
Author: User
Tags git workflow git client version control system

1. Command: Git init creates a new repository (under an empty file and then executes the command)

git clone + path checkout warehouse, from local or slave server

Git status View the status of the workspace (working dir).

2. Git workflow:

Three trees: Working dir--Index (buffer)-"head" (the composition of the Local warehouse)

Add Commit

A:git Add adds a schedule change to the cache

B:git commit commits changes to head

C:git push local branch remote branch pushes to the remote repository

D:

    • HEADThe point is the current version, so git allows us to navigate between versions of history, using commands git reset --hard commit_id .

    • Before you travel, git log you can view the commit history to determine which version to fallback to.

    • Now you understand how git keeps track of changes, every time you change it, and if you don't add get to staging area, you won't join commit in.

      GitHub provides a git repository hosting service, and GitHub is an open source collaboration community!
      [email protected]:michaelliao/learngit.git
      head是一个指针,指向master!

3. Sync: Pull Pulls

Push: Update code to a remote terminal

Git: Pull first (get updates from remote repositories and merge)

Resubmit (submits the contents of the staging area to the current branch)

Push (pushes the currently updated repository to the remote Terminal repository)

4. What version management tools do:

1. Record each change and change what? Change the time to make a record.

2. Achieve collaboration with others to work. (Who made the change in that piece)

5. Centralized version control system

A: Version inventory is placed on the central server

6. Some good resources oh

GIT website: http://git-scm.com

Git client: click here

Git manual: Http://git-scm.com/docs

The [email protected] tutorial, please check here.

A good Git starter tutorial, click here to view.

Git QuickStart (animated GIF), click here to view

Git Learning notes--a NB Distributed version control system

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.