Felix Programming Language

Git guide for developers

posted on April 05, 2009 - 10:51 PM PDT by Erick Tryzelaar

Good evening/morning/afternoon. So once everyone gets me their ssh public key you can start developing on felix. The instructions are slightly different than for the read only access. You will need to use this pattern:

> git clone felixgit@felix-lang.org:$NAME

Like this:

> git clone felixgit@felix-lang.org:felix

Or if you already are using git, you can do this:

> git remote rm origin
> git remote add origin felixgit@felix-lang.org:felix
> git fetch origin

You'll also need to run:

> git submodule init

To get submodules working. Then, introduce yourself to git:

> git config --global user.name "Erick Tryzelaar"
> git config --global user.email "erickt@example.com"

To commit, do:

> git push origin

We're also using submodules now to make it easier to track external projects. Unfortunately they don't update themselves when they're updated. So, when they change, run:

> git submodule update

If you want to modify a submodule, there are some things you have to do. First, you'll need to change from the read-only repository to the writable one:

> cd src/compiler/dypgen
> git remote rm origin
> git remote add origin felixgit@felix-lang.org:dypgen
> git checkout felix

Then make your changes. Make sure your changes are to the felix branch instead of the master branch, as the master branch will track the remote project. After you've made your change, you need to commit to the submodule first, then push the result back to the server. Finally, go back to the felix directory and commit the submodule version change:

> cd src/compiler/dypgen
> git checkout felix
... edit files
> git commit -a -m "committing changes to dypgen"
> git push origin
> cd ../../..
> git commit -a -m "committing submodule change to felix"

Next on to commit messages. The git tools are written to assume that the first line is used as the title, and should be 50 characters or less. The examples I've seen are along the lines of:

Add feature X to Y.

Lorem ipsum dolor sit amet, consectetur adipiscing
elit. Proin a felis in mi placerat commodo.

* foo bar
* baz

gitk --all and git gui are wonderful tools. If you're on the mac, gitx is also really nice, but it doesn't completely replace the other tools.

read comments