Mercurial

From TheAlmightyGuru
Jump to: navigation, search

Mercurial is a free open source command line source control program. There is a GUI frontend called TortoiseHg.

Personal

I used Mercurial at my work for several years before we switched over to Git. I found the program to obnoxiously over-complicated, but I find Git to be even worse.

Command Line Options

Show current status of local files compared to local repository.

hg status

Adds un-monitored files to local repository.

hg add

Removes files from your local repository which you have deleted.

hg remove --after

Commits local changes into local repository.

hg commit -m "Description."

Pulls remote changes to local repository.

hg pull

Merges pulled changes into local repository. Conflicts will be listed.

hg merge

If conflicts occur, resolve them manually, then run this.

hg resolve --mark

Finalizes the merger.

hg commit -m "Merged."

Pushes committed local changes to remote repository.

hg push

Links

Link-Wikipedia.png  Link-Official.png