Debian Edu Git
Beginning with Debian Edu wheezy (7.0) Debian Edu development has moved from using SVN to moving Git. The Debian Edu Git repositories are hosted on http://git.debian.org.
SVN vs. Git
For those that are not familiar with Git there are some major differences in a Git-based workflow compared to an SVN-based workflow.
- Git commits are local first, with Git you can work offline.
- Git pushes (to a central location) are similar to SVN commits. However, Git pushes can contain several local commits whereas an SVN commit is just a single commit.
- With Git we have loads of little repositories (one per Debian package), with SVN we just had a huge directory tree.
- With Git tags and branches are much nicer and completely different from the handling in SVN.
Git does not know about folders. Git only know files. If you intend to place a(n empty) folder somewhere inside a Git repos you have to create an empty .placeholder file in that folder.
SVN-2-Git Migration Status
During the migration of the Debian Edu project files from SVN to Git the current status of the migration can be viewed (and documented) here.
Setting up a Debian Edu related Git project
Create a folder with the name of your Git repository:
$ mkdir ~/<my-edu-project>
Enter that directory and initialize an empty Git repository in that folder:
$ cd ~/<my-edu-project> $ git init
- Then create files in that folder.
Then make Git aware of these files:
$ git add <file1> <file2> ... <fileN>
Then commit the files locally:
$ git commit [<file1> <file2> ... <fileN>|-a] -m "<commit-message>"
Continue with your work (add/edit files, commit working steps, etc.) until you think that your package needs to be pushed to the Debian Edu namespace on http://git.debian.org.
For a Git based Debian packaging workflow, please refer to this page: http://wiki.debian.org/PackagingWithGit
Second: initialize central repository in the Debian Edu namespace
Clone the d-e-gitscripts.git repository locally and symlink the d-e-gitcreate script to ~/bin.
$ git clone git://git.debian.org/debian-edu/d-e-gitscripts.git ~/d-e-gitscripts $ ln -s ~/d-e-gitscripts/bin/d-e-gitcreate ~/bin
NOTE: the pathes only work if you execute the first command directly in $HOME
Initialize a Debian packaging Git project
For Debian packaging projects use the following commands (from inside your git project folder):
$ cd ~/<my-edu-project> $ d-e-gitcreate <my-edu-project>
Initialize an upstream Git project
Debian Edu development does also brings forth some little upstream projects. These are also hosted on http://git.debian.org
For upstream projects use the following commands (from inside your git project folder):
$ cd ~/<my-edu-project> $ d-e-git-create upstream/<my-edu-project>
The d-e-gitcreate script will create server-side Git projects that are conform to some standards agreed upon within the Debian Edu developer team:
commit and tag messages are mailed to firstname.lastname@example.org
commit and tag messages are also displayed on #debian-edu channel on irc.debian.org
hook scripts are added to the server-side Git projects that do some sanity checks on files and allow ACLs on Git projects
Third: contributing to an already existing Git project
Clone the repository that you want to contribute to and get acquainted to the Git workflow used for that package. Recommended workflow for packaging is taking advantage of tools like git-buildpackage, pristine-tar, git-import-orig, git-import-dsc and others.
Again: refer to this location: http://wiki.debian.org/PackagingWithGit