Local macOS configuration
Python & Mercurial
This was tested on macOS El Capitan, with Pyhton 2.7 and Mercurial 4.2.2
Install Hg-Git
You will need the Hg-Git Mercurial plugin.
It can be installed with Python's package installer pip.
Install pip first:
$ wget https://bootstrap.pypa.io/get-pip.py
$ python get-pip.py
Install Mercurial (eventually) & Hg-Git:
$ sudo pip install mercurial
$ sudo pip install hg-git
Enable the extension:
$ vi ~/.hgrc:
[extensions]
hggit =
SSH key for github
create SSH key (details)
-
ssh-keygen -t rsa -b 4096 -C "someone@example.com"
add it to your github account (details)
-
$ pbcopy < ~/.ssh/id_rsa.pub
- Github: Settings -- SSH / GPG Keys -- New SSH key -- paste clipboard
Configure & share repository
create empty github repository
- create on github
- copy its URL
configure local empty repository
$ mkdir myrepo
$ cd myrepo
$ hg init
set username & include github URL as default
$ vi .hg/hgrc
[ui]
username = Someone Example
<someone@example.com>
[paths]
default = git+ssh://git@github.com/someoneaccount/myrepo.git
Push & pull
Upload local changes to github
hg addremove
hg commit
hg bookmark -r default master
hg push
Integrate locally changes made on github
hg pull -u