In the case you want to use git you should read:

http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html git tutorial, HIGHLY, recommended

http://www.kernel.org/pub/software/scm/git/docs/everyday.html everyday git, for the daily work

http://www.kernel.org/pub/software/scm/git/docs/user-manual.html git user manual, if you want to know everything

http://www.loria.fr/~molli/pmwiki/pmwiki.php/Main/See here you can find a pdf version of the user manual

getting ILC-Soft SVN into your personal git

Recently, many of the ILC-Soft CVS repositories have been converted to SVN repositories. You can use following procedure to import these SVN repositories:

# go to an empty directory for the new git repo
cd <my place>

flcini git
flcini svn

git svn clone -s http://svnsrv.desy.de/public/lccd/lccd lccd

Unfortunately, git-svn has to be installed by hand to the latest git version. Therefore, only the current version 1.6.3 supports this. Also there is currently no ssl support. Therefore, https: (which is shown in the ILCSoft example) has to be replaced by http:

getting ILC-Soft CVS into your personal git

ILCsoft/CALICE still uses the over aged CVS for archiving some of their software. Additionally, they use some non standard version which prevents to clone it into a git repository with standard tools. You need a special version of ccvssh_git to import these CVS repositories. Following procedure works:

# go to an empty directory for the new git repo
cd <my place>

# login details
export CVSROOT=:ext:anonymous@cvssrv.ifh.de:/marlin

# special version of CVSSSH
export CVS_RSH=/group/hcal/calice_soft/tools/bin/ccvssh_git

# login (password should be empty, should give ok as reply)
$CVS_RSH login

git cvsimport -v -r cvs Marlin

Some usecases how to use git for our software development:

Select patches for upload to the pro branch

git cherry-pick e21ca4 ...}}}

  1. the rebase method (recommended)

    • you can abuse git-rebase to emulate the method above

      • create a new branch starting with your development branch

        git checkout -b proupload HEAD

      • start an interactive rebase to rebase your changes upon the latest pro (or pro_test)

        git rebase -i origin/pro

      • this will open an editor. You can delete commits, merge commits into one or stop after a commit for editing of a commit before continuing
      • when you close your editor, the rebase process starts.
      • if the rebase process stops because of a conflict or because you choose edit for one commit, edit the code and carry on by typing git rebase --continue. If you are lost type git rebase --abort and try again

  2. the pick file method

    • if you don't have "clean" commits, which you want to select for uploading into pro, you could try this
      • select the files which changes you want to track
      • create a patchset, which contains the changes of this file:

        git log  --pretty=email  --reverse -p pro..HEAD  calice-reco/src/myfile1.cc calice-reco/include/myfile1.hh  >/tmp/myPatch.patch

      • create a new branch starting with the latest pro branch  git checkout -b proupload pro 

      • apply your patchset to this new branch:

        cat /tmp/myPatch.patch|git-am

GITHowTo (last edited 2010-01-08 15:53:36 by BenjaminLutz)