Git 官方文档

Local Changes

Changed in working directory

Tracked file changes

Add changed files

Remove file

See files ready for commit

Commit changes

Change last commit

Revert changes to file

Revert changes (new commit)

Return to last committed state

History

Show all commits

Patches

Show file commits

Show directory commits

Who changed file

Merge/Rebase

Merge branch into current

Abort rebase

Merge tool to solve conflicts

To view the merge conflicts

To discard conflicting patch

After resolving conflicts

Remote Update / Publish

List remotes

Show information

Fetch changes

Fetch + merge

Publish local to remote

Delete remote branch

Branching/Tagging

List branches

Switch to branch

Create new branch

Create branch from existing

Delete branch

Tag current commit

Useful Commands

Finding Regressions

Check for Errors and Cleanup Repository

Search Working Directory for foo()