Summary

The following table summarizes all 21 commands for Git. See Table A.1, “Commands” in Appendix A, Comparison Table for a comparison of Git’s commands with other tools.

OperationGit Command
Creategit init
Checkout[a]
Commitgit commit -a[b]
Updategit checkout[c]
Addgit add[d]
Editgit add[e]
Deletegit rm
Renamegit mv
Movegit mv
Statusgit status
Diffgit diff
Revertgit checkout[f]
Loggit log
Taggit tag
Branchgit branch
Mergegit merge
Resolve[g]
Lock[h]
Clonegit clone
Pushgit push
Pullgit fetch[i]

[a] N/A: Git keeps the repository instance inside the working copy.

[b] Without the -a flag, git will commit only those changes which have been explicitly added to its staging area.

[c] Git automatically updates the working copy as part of a git pull.

[d] git add is also used to add any sort of change to the staging area.

[e] Or use git commit -a

[f] git revert is a completely different command, used to alter changesets that have already been committed.

[g] N/A

[h] Unsupported

[i] git fetch implements the behavior I describe as pull; git pull is equivalent to pull followed by update.