Tuesday, September 28, 2010

hg for ~

bitbucket is now offering free private repos for their mercurial DVCS.  I used to use github but paying $7 per month to store some modest source code and a few dot-files seemed too much.

Here's how I set up mercurial and bitbucket to manage my home directory configuration files.

Go to bitbucket.org and create a new project named 'home' or something.

kabar:~>hg clone http://bitbucket.org//home
kabar:~/home>cd home
kabar:~/home>mv .hg ..
kabar:~/home>cd ..
kabar:~>ls -a > .hgignore
kabar:~>hg add .vimrc
kabar:~>hg add .bashrc
kabar:~>hg status
A .bashrc
A .vimrc
kabar:~>hg commit -m 'initial checkin of dotfiles'
kabar:~>hg push
http authorization required
realm: Bitbucket.org HTTP
user:
password:
pushing to http://bitbucket.org//home
searching for changes
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 2 changes to 2 files
remote: bb/acl: is allowed. accepted payload.

Then you probably want something like this in your ~/.hgrc

bitbucket.prefix = http://bitbucket.org//home
bitbucket.username =
bitbucket.password =
bitbucket.schemes=https

0 comments:

About Me

My Photo
Denver, CO, United States
Enterprise Java engineer and architect.