本文介绍除Git外一些常见的分布式版本控制系统(Distributed Version Control System即DVCS)
目录
Mercurial
- 安装
brew install Mercurial
关于Mercurial安装 更多参考Mercurial downloads
- 本地
mkdir hg-test && cd hg-test
hg init
echo "Version 1" > README.md
hg status
# ? README.md
hg add
# adding README.md
# hg config --edit
hg commit -m "Version 1"
hg log
echo "Version 2" > README.md
hg diff
hg branch new-feature
# marked working directory as branch new-feature
hg add
hg commit -m "Version 2"
hg log
hg update default
# 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
hg branch
# default
cat README.md
# Version 1
GUI工具有TortoiseHg
- 服务
hg serve
浏览器打开localhost:8000
hg clone http://127.0.0.1:8000 hg-test
免费的公共Mercurial服务还有Bitbucket
Bazaar
- 安装
brew install Bazaar
关于Bazaar安装 更多参考Download and Install Bazaar
- 本地
mkdir bzr-test && cd bzr-test
bzr init
echo "Version 1" > README.md
bzr status
# unknown:
# README.md
bzr add
# adding README.md
# bzr whoami "Yuan Lin <yuanlin@gmail.com>"
bzr commit -m "Version 1"
bzr log
- 服务
bzr serve
# listening on port: 4155
关于Bazaar服务的更多介绍 可以参考Running a smart server
Darcs
- 安装
brew install Darcs
关于Darcs安装 更多参考Download Darcs
- 本地
mkdir darcs-test && cd darcs-test
darcs init
echo "Version 1" > README.md
darcs status
# A ./README.md
darcs add --recursive .
# Adding 'README.md'
darcs commit -m "Version 1"
darcs log
- 服务
网友评论