[Tracker] GIT Repository Now Available



Hi,

So, by now you might notice that the SVN repository for Tracker is READONLY not allowing any commits. This is because we have no officially switched to GIT.

--

Here is a quick how to for the initiates among us (note: my knowledge of git is pretty basic, so if anyone has any more/better suggestions here, please don't hesitate to let us know):

For *READONLY* checkouts use (<dir> is not required):

        git clone git://git.gnome.org/tracker <dir>

For *WRITE* checkouts use (<dir> is not required, but <user> is):
Your <user> here is the same GNOME user name you had before:

        git clone ssh://<user>@git.gnome.org/git/tracker <dir>

From what I have read and heard, it is common practise to never work on master (the checked out source). Best practise is to create a branch (for example "work", it can be what you like), you can do this with:

        git checkout -b work

This will switch to the branch for you too.
Then we make changes to the code.

To add files to be committed use:

        git add <file1> <file2> <...>

Then commit the code:

        git commit -m "<message>"

Most of this stuff is straight forward if you have used GIT already.
What is important is that we fetch the latest changes before trying to commit, much like we would with SVN. We can do this with:

        git fetch

We then want to update our branches locally with:

        git rebase origin/master

Once this is done we can push our changes to the remote GNOME repository using:

        git push ssh://<user>@git.gnome.org/git/tracker work:master

Since this is quite a long line to do for every commit, you can make life easier by adding an alias using:

        git config --global \
                url.ssh://<user>@git.gnome.org/git/.insteadof gnome:

For me, this means my ~/.gitconfig has these lines (my user being "mr"):

        [url "ssh://mr git gnome org/git/"]
                insteadof = gnome:

In practise, this means we can now use:

        git push gnome:tracker work:master

--

I hope this helps. For those wishing to follow GIT changes to GNOME using the web interface, they can use:

        http://git.gnome.org/cgit/

For tracker specifically:

        http://git.gnome.org/cgit/tracker/

For those wanting to use an application to view changes (and also to do some nifty things like generating patches etc), checkout Giggle which has been written in part by our resident indexer specialist :) (Carlos)

        http://live.gnome.org/giggle

Any problems, let me know!

--
Regards,
Martyn



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]