Re: Git development

Jocelyn <[email protected]> Fri, 14 Aug 2009 10:00:57 +0200
Newsgroups gmane.comp.lang.eiffel.gobo.devel
Message-ID <[email protected]>
In a previous post, Eric said the git tools for Windows were not very
attractive.
And I agree they are not yet at the same level as TortoiseSVN.

However, personally I am using on Windows
    - msysGit  http://code.google.com/p/msysgit/downloads/list
    - for the gui ... either git gui, or gitk which come with any git setup
       but most often, I use Git Extensions
(http://sourceforge.net/projects/gitextensions/) which is good enough
for my need.
    - I tried to use TortoiseGIT (http://code.google.com/p/tortoisegit/)
but I was unable to make it work on my Win XP Pro 64bits (too bad, since
I am a TortoiseSVN user, and I really like it)

For my usage, the Git Extensions GUI is good enough, and when I need to
do complicated operation (or even simple) I use (very often) git in
command line (as I do with svn)
Indeed git is much more powerful than svn, but it is also more
complicated (in addition the command name are not always very
intuitive), thus I find it often easier to use command line to do
exactly what I want.
Also the branching is great, but you have to get used to it, otherwise
you waste time figuring out how to best deal with it (in final, I learnt
that the best solution is to ALWAYS work on its own branch, and merge
with the master/trunk when ready to commit)

And at the end, I agree that git on Windows is much slower than git on
linux (especially git svn), but it is ok

There are other alternative to git, such as mercurial, but I don't
really know them. It seems like git is the most popular (due to linux
repo I guess).
I heard there is a native client for Windows in development, but I don't
know where to find it ...

Maybe before going for git, Gobo's dev could use git-svn as following
    >    mkdir gobo.git
    >    cd gobo.git
Initialize your local repository based on the gobo's subversion  repo
    >    git svn init
https://gobo-eiffel.svn.sourceforge.net/svnroot/gobo-eiffel/gobo/trunk
fetch the commits from revision 6555  (for instance this one which is
the gobo 3.9 release)
note, you can also git clone the entire gobo's repository .. but it is
longer
    >    git fetch -r6555
now, get sync with trunk@HEAD
    >    git svn rebase

If you want, to do some modification, I would recommend to work on your
own branch  (I use my login for that "jfiat")
    >   git checkout -b jfiat

Then you can work on your own branch ... as with any git repo, so check
the git tutorials to know how to use git. This includes locally commits
(that's such a great feature, I wish subversion implement it some day).

And when ever you are ready to commit and "push" to the official gobo's
svn repository, you switch back to the master (which represent the trunk
in subversion)
    >    git checkout master
Eventually sync with head with:  git svn rebase

Merge the changes from your branch
    >    git merge --squash jfiat
The --squash is used to merge your branch to the master .. BUT without
doing any commit, then you can commit your change in only one commit.
I tried without the "--squash", and it re-creates all the commits done
in my branch into the master. This could be useful, if you want to
"replay" your work in the master for history...

You can then commit your change
    >    git commit -a -m "Merge jfiat's branch into the master branch
to implement feature X"

And finally, you push/send your changes to the svn repo
    >   git svn dcommit

Check the following links for use cases:
    - http://techbase.kde.org/Development/Tutorials/Git
    - http://live.gnome.org/GitForGnomeDevelopers

So this way to do, can be a temporary solution to use git with Gobo.
Then decide with gobo's developers, if git is the right tool for gobo's
repo.

(Note that using git with real git repositories, is easier and more fun,
but .. git-svn is a solution to try, and even work)

-- Jocelyn

Howard Thomson wrote:

> >
> > Hi Eric & Wolfgang,
> >
> > I would welcome a move to using Git as the SCM system for Gobo.
> >
> > I see that there is a useful page on wikipedia about git, with
> > reference to Windows implementations:
> >
> > http://en.wikipedia.org/wiki/Git_(software)#Implementation
> >
> > There is also an excellent website detailing how to use git ...
> >
> > http://progit.org/
> >
> > <snip>....</snip>
> >
> > I think using Git would assist in cooperation between myself and other
> > gobo-eiffel contributors and developers.
> >
> > Regards,
> >
> > Howard Thomson
> >
>   

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july