Version Control System
Perforce
Official p4 document
Add files and edit
p4 add [-c changelist#] <filename>
Checkout files and edit
p4 edit [-c changelist#] <filename>
Edit a changelist description(Add/remove files)
Move file to another changelist
p4 reopen [-c changelist#] file
Discard changes from an opened file
Delete a changelist
p4 revert -c changelist# //...
p4 change -d changelist#
Create a changelist from default changelist
See pending/submitted changes
p4 changes -u $P4USER -c $P4CLIENT -s $STATUS(pending, submitted, shelved)
See the latest change in current directory local have
See the latest change in current directory server have
Check-in change
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]
Lists files currently opened in pending changelists
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
gitk - graphical history browser, in Tcl/Tk, distributed with Git (usually in gitk package)
git gui - graphical commit tool, in Tcl/Tk, distributed with Git (usually in git-gui package)
-
-
-
gitg - GTK+/GNOME clone of GitX
tig - text mode interface for git, is
GUI and pager, uses ncurses
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 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