Contribute with Git

Contribute with Git#

Contributing to the project using git is possible thanks to git-remote-hg. You still need to have mercurial installed.

Warning

This method using a Git client is a bit experimental and we don’t really know what will happen if another developer touches your branch (which is common with our Mercurial workflow). The overall developer experience will of course be better with a Mercurial client.

However, this is a good solution for simple contributions.

Add the git-remote-hg script anywhere in your $PATH:

curl https://raw.githubusercontent.com/felipec/git-remote-hg/topics/git-remote-hg -o ~/bin/git-remote-hg
chmod +x ~/bin/git-remote-hg

Note

We are downloading the topics branch of the project to be compatible with our Mercurial workflow based on topics.

Then your workflow to contribute to, for example, these pages will be:

  • clone the repository

$ git clone "hg::ssh://hg@foss.heptapod.net/py-edu-fr/py-edu-fr.pages.heptapod.net"
$ cd py-edu-fr.pages.heptapod.net
$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
$ git remote -v
origin	hg::ssh://hg@foss.heptapod.net/py-edu-fr/py-edu-fr.pages.heptapod.net (fetch)
origin	hg::ssh://hg@foss.heptapod.net/py-edu-fr/py-edu-fr.pages.heptapod.net (push)
  • create a new branch

git checkout -b topics/changes-with-git
  • make some modifications and commit

git commit -a -m "commit my changes"
  • push

git push origin topics/changes-with-git