dev:kb:version_control
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
dev:kb:version_control [2014/03/05 13:15] – [Add directory recursively to perforce depot] hackerzhou | dev:kb:version_control [2020/06/06 23:32] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Version Control System ====== | ====== Version Control System ====== | ||
- | ===== Perforce ==== | + | |
+ | ===== Perforce ===== | ||
==== Official p4 document ==== | ==== Official p4 document ==== | ||
- | http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | |||
+ | ==== Add files and edit ==== | ||
+ | < | ||
+ | p4 add [-c changelist# | ||
+ | </ | ||
+ | |||
+ | ==== Checkout files and edit ==== | ||
+ | < | ||
+ | p4 edit [-c changelist# | ||
+ | </ | ||
+ | |||
+ | ==== Edit a changelist description(Add/ | ||
+ | < | ||
+ | p4 change changelist# | ||
+ | </ | ||
+ | |||
+ | ==== Move file to another changelist ==== | ||
+ | < | ||
+ | p4 reopen [-c changelist# | ||
+ | </ | ||
+ | |||
+ | ==== 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/ | ||
+ | < | ||
+ | p4 changes -u $P4USER -c $P4CLIENT -s $STATUS(pending, | ||
+ | </ | ||
+ | |||
+ | ==== 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# | ||
+ | </ | ||
+ | |||
+ | ==== 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 ==== | ==== Add directory recursively to perforce depot ==== | ||
+ | |||
<code bash> | <code bash> | ||
# In Windows | # In Windows | ||
Line 13: | Line 98: | ||
files -f -q -r -s | p4 -x - add | files -f -q -r -s | p4 -x - add | ||
</ | </ | ||
+ | |||
===== Git ===== | ===== Git ===== | ||
+ | === GUI client ==== | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | ==== Git clone specified branch ==== | ||
+ | <code bash> | ||
+ | git clone {URL} -b master | ||
+ | </ | ||
+ | ==== Git switch branch ==== | ||
+ | <code bash> | ||
+ | git checkout dev | ||
+ | </ | ||
+ | |||
+ | ==== Git delete local branch ==== | ||
+ | <code bash> | ||
+ | git branch -d test_branch | ||
+ | </ | ||
+ | |||
+ | ==== Git delete remote branch ==== | ||
+ | <code bash> | ||
+ | git push origin : | ||
+ | </ | ||
+ | |||
+ | ==== Git push branch to remote ==== | ||
+ | < | ||
+ | git push -u origin new_branch | ||
+ | </ | ||
===== SVN ===== | ===== SVN ===== | ||
+ | |||
dev/kb/version_control.1394025339.txt.gz · Last modified: 2020/06/06 23:32 (external edit)