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:
HEAD
The 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