Some familiarity with git is recommended: Here you can find the manual pages and some nice tutorial.
There's a repository called contrib-test.git that you can use for your very first steps with git. It's not connected to the real contrib.git repository, so you cannot break anything when working with it.
To tell git who you are and to define some useful defaults, set up ~/.gitconfig like this:
[user] email = email@example.com name = Your RealName [push] default = current
Now configure ssh for access at crux.nu: edit ~/.ssh/config and add:
Host crux.nu HostName crux.nu Port 2222
$ git clone ssh://firstname.lastname@example.org/ports/contrib.git contrib
The previous command should clone the latest available contrib repository into a "contrib" directory. Now run the following commands to configure branches:
$ git branch 3.3 origin/3.3 $ git branch 3.4 origin/3.4
This tells git to grab the necessary branches.
Note that the new contrib repository has one branch for each CRUX version, thus giving the possibility to work on a future release and backport updates to a previous one, much like the core and opt collections.
When development for a new CRUX version has started, you can simply add this new branch to your local repository, i.e.:
$ git branch 3.4 origin/3.4
After cloning and initial configuration, select the branch you want to work on, ie:
$ git checkout 3.3
You can list the available branches and display the active one with
$ git branch
$ cd PATH/TO/WORKING/COPY $ cp -r $PATH/myport . $ git add myport $ git commit -m "myport: initial commit" $ git push
$ cd PATH/TO/WORKING/COPY $ git rm -r someport $ git commit -m "someport: removed from repository" $ git push
$ cd PATH/TO/WORKING/COPY/someport (edit files, ie Pkgfile and .md5sum) either: $ git add Pkgfile .md5sum [...] $ git commit -m "someport: updated to 3.22" or directly: $ git commit -m "someport: updated to 3.22" Pkgfile .md5sum [...] $ git push
If you run in trouble with the last command, because someone else has modified the repository in the meantime, run the following commands (ie to "fix" branch 3.3):
$ git fetch $ git rebase origin/3.3 $ git log $ git push
Let's say that you have two branches, 3.3 and 3.4. If you now modify one or more ports in branch 3.3, it's possible to merge these changes easily into another branch, ie 3.4:
$ git checkout 3.4 $ git pull . 3.3
But use this option with care as it will merge all changes (since the last merge) into branch 3.3
$ cd PATH/TO/WORKING/COPY $ git fetch updating branch 3.4: $ git checkout 3.4 $ git rebase origin/3.4 updating branch 3.3: $ git checkout 3.3 $ git rebase origin/3.3