====== Version Control System ====== ===== Perforce ===== ==== Official p4 document ==== * [[http://www.perforce.com/perforce/doc.current/manuals/p4guide/chapter.usingp4.html|http://www.perforce.com/perforce/doc.current/manuals/p4guide/chapter.usingp4.html]] * [[http://www.perforce.com/perforce/doc.current/manuals/cmdref/index.html|http://www.perforce.com/perforce/doc.current/manuals/cmdref/index.html]] ==== Add files and edit ==== p4 add [-c changelist#] ==== Checkout files and edit ==== p4 edit [-c changelist#] ==== Edit a changelist description(Add/remove files) ==== p4 change changelist# ==== Move file to another changelist ==== p4 reopen [-c changelist#] file ==== Discard changes from an opened file ==== p4 revert file ==== Delete a changelist ==== p4 revert -c changelist# //... p4 change -d changelist# ==== Create a changelist from default changelist ==== p4 change ==== See pending/submitted changes ==== p4 changes -u $P4USER -c $P4CLIENT -s $STATUS(pending, submitted, shelved) ==== See the latest change in current directory local have ==== p4 changes -m1 ...#have ====See the latest change in current directory server have ==== p4 changes -m1 ... ====Check-in change ==== p4 submit -c changelist# ====Shelve a change ==== p4 shelve -r -c changelist# ==== Discard the shelved files ==== p4 shelve -d -c changelist# ==== Unshelve a change ==== p4 unshelve -s shelvelist# [-c changelist#] [file] ==== Displays full information about a single changelist ==== p4 describe changelist# ==== Lists files currently opened in pending changelists ==== p4 opened ==== Add directory recursively to perforce depot ==== # In Windows dir /b /s /a-d | p4 -x – add # In Linux/Unix find . -type f -print | p4 -x - add # In Mac files -f -q -r -s | p4 -x - add ===== Git ===== === GUI client ==== * [[http://gitk.sourceforge.net/|gitk]] - graphical history browser, in Tcl/Tk, distributed with Git (usually in gitk package) * [[http://www.kernel.org/pub/software/scm/git/docs/git-gui.html|git gui]] - graphical commit tool, in Tcl/Tk, distributed with Git (usually in git-gui package) * [[http://digilander.libero.it/mcostalba/|QGit]] - uses Qt toolkit * [[https://wiki.gnome.org/Apps/giggle|Giggle]] - uses GTK+ toolkit * [[http://cola.tuxfamily.org/|git-cola]] - uses PyQt4 * [[http://git.gnome.org/cgit/gitg/|gitg]] - GTK+/GNOME clone of GitX * [[http://jonas.nitro.dk/tig/|tig]] - text mode interface for git, is GUI and pager, uses ncurses * [[https://sites.google.com/site/gitforcetool/home|GitForce]] Git tool with Graphical user interface, available under GNU GPL license ==== Git clone specified branch ==== git clone {URL} -b master ==== Git switch branch ==== git checkout dev ==== Git delete local branch ==== git branch -d test_branch ==== Git delete remote branch ==== git push origin :test_branch ==== Git push branch to remote ==== git push -u origin new_branch ===== SVN =====