github的猫咪好可爱

2012-10-08 19:13:05


Git的实例好好用啊 http://try.github.com/levels/1/challenges/1
SVN  HG GIT
1,第一次下载,包括源码和版本库: svn checkout http://path/to/repo repo_name hg clone http://path/to/repo  repo_name git glone http://path/to/repo repo_name或者git glone git://path/to/repo repo_name
2,下载服务器上最新的更新: svn update hg pull && hg update -C git pull
3,检出某个修订版本 svn checkout -r <rev> hg update -C -r <rev> git reset --hard -r <rev>
4,新增被跟踪文件 svn add /path/to/file hg add /path/to/file git add /path/to/file
4,移除被跟踪文件 svn rm /path/to/file hg remove /path/to/file git rm /path/to/file
5,生成补丁 svn diff  >patch_file hg diff >patch_file git diff >patch_file
6,提交更改 svn commit hg commit git commit
6,查看当前状态 svn info hg status git status
7,查看修订记录 svn log hg log git log
8,启动服务器 svnserve -d hg serve -p 8002 & git daemon --base-path=/path/to/repo --export-all &
|