The Top Ten Subversion Tips for CVS Users


...

1. Use status to find out your ... status


$ svn status --show-updates --verbose
* 44 23 sally README
44 30 sally INSTALL
* 44 35 harry trout.c
D 44 19 ira fish.c
A 0 ? ? shrimp.c
M * 44 32 sally anemone.c
44 36 harry things/rocks.txt

2. Remember, you can move things around


$ svn move -m "Move a file" http://svn.red-bean.com/repos/foo.c \
http://svn.red-bean.com/repos/bar.c

3. Tag and branch by copying


$ svn copy -m "Tag rc1 rel." http://svn.red-bean.com/repos/trunk \
http://svn.red-bean.com/repos/tags/1.0rc1


4. "Revert" instead of "delete and update"


$ rm I-made-a-boo-boo.txt
$ cvs up I-made-a-boo-boo.txt
U I-made-a-boo-boo.txt


$ svn revert I-made-a-boo-boo.txt
Reverted 'I-made-a-boo-boo.txt'

5. Don't fear your version control system

SUBVERSION WILL NEVER EVER EVER DO ANYTHING TO YOUR DATA UNLESS YOU ASK IT TO.

  $ svn propset svn:eol-style native halibut.c

6. Log, log, log your log


Subversion's log command is so much more powerful than CVS log
that it merits a mention.

7. Quickly undo a mistaken commit

  $ svn merge -r 303:302 http://svn.example.com/repos/calc/trunk
U oyster.c

8. Resurrect deleted items


$ svn copy --revision 807 \
http://svn.red-bean.com/repos/trunk/perch.c ./perch.c

9. Switch to a branch without checking out a new working copy


$ svn switch http://svn.red-bean.com/repos/branches/vendors-with-fix .
U myproj/foo.txt
U myproj/bar.txt
U myproj/baz.c
U myproj/qux.c
Updated to revision 31.

10. Browse or even mount your repository





คำสำคัญ (Tags): #cvs#svn
หมายเลขบันทึก: 187739เขียนเมื่อ 12 มิถุนายน 2008 19:03 น. ()แก้ไขเมื่อ 15 เมษายน 2012 02:10 น. ()สัญญาอนุญาต: จำนวนที่อ่านจำนวนที่อ่าน:


ความเห็น (0)

ไม่มีความเห็น

พบปัญหาการใช้งานกรุณาแจ้ง LINE ID @gotoknow
ClassStart
ระบบจัดการการเรียนการสอนผ่านอินเทอร์เน็ต
ทั้งเว็บทั้งแอปใช้งานฟรี
ClassStart Books
โครงการหนังสือจากคลาสสตาร์ท