The following commands should only be used with git version less than or equal to 1.4!
To tell git who you are, set up ~/.gitconfig like this:
[user] email = my@myhost.org name = Your RealName
Now configure ssh for access at crux.nu: edit ~/.ssh/config and add:
Host crux HostName crux.nu Port 2222 User <username>
$ git clone crux:/home/crux/scm/ports/contrib.git contrib
The previous command should clone the latest available contrib repository into a "contrib" directory. Now edit contrib/.git/remotes/origin to configure branches:
URL: crux:/home/crux/scm/ports/contrib.git Pull: refs/heads/master:refs/heads/origin Pull: refs/heads/2.2:refs/heads/2.2 Push: refs/heads/2.2:refs/heads/2.2
This tells git to push/pull your local "2.2" branch to/from the remote "2.2" branch. 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 developement for a new CRUX version has started, you can simply add a couple of lines to contrib/.git/remotes/origin, ie:
Pull: refs/heads/2.3:refs/heads/2.3 Push: refs/heads/2.3:refs/heads/2.3
After cloning and initial configuration, select the branch you want to work on, ie:
$ git checkout 2.2
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 origin
$ cd PATH/TO/WORKING/COPY $ git rm -f someport $ git commit -m "someport: removed from repository" $ git push origin
$ cd PATH/TO/WORKING/COPY/someport (edit files, ie Pkgfile and .md5sum) either: $ git-update-index Pkgfile .md5sum [...] $ git commit -m "someport: updated to 3.22" or directly: $ git commit -m "someport: updated to 3.22" Pkgfile .md5sum [...] $ git push origin
If you run in trouble with the last command, because someone other has modifiy the repositiory in the meantime, run the following commands:
$ git fetch $ git rebase origin $ git push origin
$ cd PATH/TO/WORKING/COPY $ git pull origin