Re: [AD] switching to git, 2012 edition

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sun, 1 Jul 2012 12:53:09 +1000
Peter Wang <novalazy@xxxxxxxxxx> wrote:

> It's done now.
> 

Yay. So I guess we can now officially declare the switch. I feel almost
as excited as after the commit to remove END_OF_MAIN :)

So, for any committers not knowing git, an excerpt of Thomas' earlier
post, this is how you do your initial checkout:

1. git clone ssh://USER@xxxxxxxxxxxxxxxxxxxxxxxxx/gitroot/alleg/allegro

This is how you commit a change:

1. cd allegro

2. <make your changes>

3. if you added new files: git add <new files> 

4. git commit -a

5. <write commit message (linux kernel standard is max. 50 char header
line, then empty line, then detailed description) but doesn't matter>

6. git push origin 5.1

This is how you synchronize changes by others:

1. cd allegro

2. git pull

For anything else, the builtin documentation has a lot more
info than SVN and there's also google (but be aware that instead of
"master" it is called "5.1" for us in all the examples out there) or
just ask here.

> For future reference, it was a bit more complicated than I thought.
> I had to log in via the shell server and edit the config file in
> /home/scm_git/a/al/alleg/allegro, temporarily setting
> receive.denyNonFastforwards = false.

I see. Never used filter-branch myself... but it still would have saved
me a lot of time doing it that way instead of a new conversion I
suppose.

> I did not use git push --mirror.  If I understood correctly, that
> would have created a new remote repository called 'origin' on the
> server containing all the branches that I had filtered, rather than
> updating the existing branches.  I used a similar script to [1] to
> push the branches individually, then pushed the tags as well.
> 

I think it would have overwritten them, but not sure.

> 
> I renamed the master branch to 5.1.
> 
> The server repository contains some unwanted branches and remotes
> and tags.  To be deleted.
> 

Probably due to the --mirror I used instead of pushing each branch... I
guess "git push --delete <branch>" can be used to remove branches. Not
sure how the server can have any remotes, I didn't think push would
transfer those. (I also don't know how to even view them.)




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/