Basic Commands
Table explanation
- Commands in green rectangles that are not surrounded by are at an interactive command-line prompt. Text in is an explanation of where to find equivalent functionality.
- repository init: Create a new empty repository (i.e., version control database)
- clone: Create an identical instance of a repository (in a safe transaction)
- pull: Download revisions from a remote repository to a local repository
- push: Upload revisions from a local repository to a remote repository
- local branches: Create a local branch that does not exist in the original remote repository
- checkout: Create a local working copy from a (remote) repository
- update: Update the files in a working copy with the latest version from a repository
- lock: Lock files in a repository from being changed by other users
- add: Mark specified files to be added to repository at next commit
- remove: Mark specified files to be removed at next commit (note: keeps cohesive revision history of before and at the remove.)
- move: Mark specified files to be moved to a new location at next commit
- copy: Mark specified files to be copied at next commit
- merge: Apply the differences between two sources to a working copy path
- commit: Record changes in the repository
- revert: Restore working copy file from repository
- generate bundle file: Create a file that contains a compressed set of changes to a given repository
- rebase: Forward-port local commits to the updated upstream head
| software | repository init | clone | pull | push | local branches | checkout | update | lock | add | remove | move | copy | merge | commit | revert | generate bundle file | rebase |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| AccuRev SCM | mkdepot | N/A | N/A | N/A | mkstream | mkws | update | anchor | add | defunct | move | cp add / incl -s / ln | merge | keep / promote | purge / revert | N/A | chstream |
| Bazaar | init | branch | pull | push | create-local-branch | checkout | update | Unknown | add | rm | mv | N/A | merge | commit | revert | send | rebase |
| ClearCase | init | N/A | N/A | N/A | N/A | checkout | update | lock / unlock | mkelem | rmname | mv | N/A | merge | checkin | uncheckout / rmver | N/A | findmerge |
| CVS | init | N/A | N/A | N/A | N/A | checkout | update | Unknown | add | rm | N/A | N/A | update -j | commit | remove update | N/A | N/A |
| CVSNT | init | N/A | N/A | N/A | N/A | checkout | update | edit | add | rm | rename | N/A | update -j | commit | update -C | N/A | N/A |
| darcs | init | get / put | pull | push | N/A | get | pull | Unknown | add | remove | move | N/A | pull / push | record | revert | send -o | Coming soon |
| Fossil | new / open | clone | pull | push | branch / commit --branch | clone/open | update | N/A | add | rm/del | mv/rename | N/A | merge | commit | revert | N/A | N/A |
| Git | init / init --bare | clone | fetch | push | branch | clone | pull | N/A | add | rm | mv | cp git add | merge | commit | checkout | bundle | rebase |
| Mercurial | init | clone | pull | push | bookmark | clone | pull -u | N/A | add | rm | mv | copy | merge | commit | revert | bundle | rebase |
| Monotone | init | clone | pull | push | N/A | checkout | update | Unknown | add | drop | rename | N/A | merge | commit | revert | N/A | N/A |
| Perforce | p4d | Unknown | Unknown | Unknown | N/A | edit | sync | lock / unlock | add | delete | move | integrate | resolve | submit | revert | Unknown | Unknown |
| SVK | svk depotmap svnadmin create) | mirror | pull | push | copy | checkout | update | Unknown | add | rm | mv | cp | merge | commit | revert | N/A | smerge -I |
| Subversion | svnadmin create | svnadmin hotcopy | : svnadmin load | : svnadmin dump | N/A | checkout | update | lock | add | rm | mv | cp | merge | commit | revert | N/A | N/A |
| Surround SCM | mkmainline | N/A | N/A | N/A | mkbranch | checkout | get | checkout | add | rm | move | N/A | merge | checkin | voidcheckout | N/A | rebase |
| Veracity | repo init | clone | pull | push | branch | checkout | pull -u | lock | add | rm | mv | N/A | merge | commit | revert | N/A | N/A |
| Vesta | vcreate | vrepl | vrepl | vrepl | N/A | vcheckout | vadvance | vcheckout | vcheckin | vrm | mv vcheckin | cp vcheckin | vdiff | vcheckin | vcheckin -c 0 | vmake vesta | vadvance |
| Visual SourceSafe | ? | Unknown | Unknown | Unknown | N/A | Get Latest | Get Latest | Check Out | Add Files | Delete | ? | Unknown | ? | Check In | Undo Check Out | Unknown | Unknown |
| software | repository init | clone | pull | push | local branches | checkout | update | lock | add | remove | move | copy | merge | commit | revert | generate bundle file | rebase |
Read more about this topic: Comparison Of Revision Control Software
Famous quotes containing the words basic and/or commands:
“Of course I lie to people. But I lie altruisticallyfor our mutual good. The lie is the basic building block of good manners. That may seem mildly shocking to a moralistbut then what isnt?”
—Quentin Crisp (b. 1908)
“They went to him and woke him up, shouting, Master, Master, we are perishing! And he woke up and rebuked the wind and the raging waves; they ceased, and there was a calm. He said to them, Where is your faith? They were afraid and amazed, and said to one another, Who then is this, that he commands even the winds and the water, and they obey him?”
—Bible: New Testament, Luke 8:24-25.