# Git for collaborative web development

5 messages from 2009-03-26 to 2009-03-27. Participants: Carlo, Sverre Rabbelier, Mr.SpOOn, Giuseppe Bilotta.
Thread: https://gitlist.dev/t/18576

## Carlo, 2009-03-26 18:51

Subject: Git for collaborative web development
Message-ID: <loom.20090326T184207-345@post.gmane.org>
URL: https://gitlist.dev/e/loom.20090326T184207-345%40post.gmane.org

```
Hi,
I'm going to work on a web project with a friend. We will host our code on a
server and my idea was to set up a git repository (maybe using gitosis) so that
we could work on our machines and push the changes to the server.

He said that it would be complicated, because if he's going to try some changes
to show me on the fly he just can't. I mean, he would like to work on the code
directly on the server, so that he can change the code, save and I can just
refresh the page from my browser and see what he did.

Using git he should save, commit, add, push... so it's a bit longer.

Is there a nice compromise? Or a better way to use git for such a task or web
development in general?

Thanks for your help,
bye.

```

## Sverre Rabbelier, 2009-03-26 19:18

Subject: Re: Git for collaborative web development
Message-ID: <fabb9a1e0903261218y329562f6uf18613f3f9e15836@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e0903261218y329562f6uf18613f3f9e15836%40mail.gmail.com
In-Reply-To: <loom.20090326T184207-345@post.gmane.org>

```
Heya,

On Thu, Mar 26, 2009 at 19:51, Carlo <mr.spoon21@gmail.com> wrote:
> Using git he should save, commit, add, push... so it's a bit longer.
>
> Is there a nice compromise? Or a better way to use git for such a task or web
> development in general?

$ git config alias.tryout "!git branch -f tryout && git checkout
tryout && git add . && git commit -m TryOut && git push shared_repo
tryout"

You can even see the page live if you set the proper attributes ;).

-- 
Cheers,

Sverre Rabbelier

```

## Mr.SpOOn, 2009-03-26 19:41

Subject: Re: Git for collaborative web development
Message-ID: <8f67b6f80903261241s7bbb179bwf5e9fa64f657ca1d@mail.gmail.com>
URL: https://gitlist.dev/e/8f67b6f80903261241s7bbb179bwf5e9fa64f657ca1d%40mail.gmail.com
In-Reply-To: <fabb9a1e0903261218y329562f6uf18613f3f9e15836@mail.gmail.com>

```
2009/3/26 Sverre Rabbelier <srabbelier@gmail.com>:
> $ git config alias.tryout "!git branch -f tryout && git checkout
> tryout && git add . && git commit -m TryOut && git push shared_repo
> tryout"

That seems cool. I'll take a look to some documentation to understand it :D
Thanks.

```

## Sverre Rabbelier, 2009-03-26 19:44

Subject: Re: Git for collaborative web development
Message-ID: <fabb9a1e0903261244n15d31b1dw4990e31aafca64f3@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e0903261244n15d31b1dw4990e31aafca64f3%40mail.gmail.com
In-Reply-To: <8f67b6f80903261241s7bbb179bwf5e9fa64f657ca1d@mail.gmail.com>

```
Heya,

On Thu, Mar 26, 2009 at 20:41, Mr.SpOOn <mr.spoon21@gmail.com> wrote:
> That seems cool. I'll take a look to some documentation to understand it :D

There's probably some typo's and thinko's in there, but you get the
idea. You can use aliases in git to define your own commands. If you
do not prefix the command with a bang it is interpreted as git
command, I use this one to review the changes I made with respect to
origin:

$ git config alias.new "log -C -M --reverse -p origin/master.."

-- 
Cheers,

Sverre Rabbelier

```

## Giuseppe Bilotta, 2009-03-27 00:57

Subject: Re: Git for collaborative web development
Message-ID: <gqh89k$tob$1@ger.gmane.org>
URL: https://gitlist.dev/e/gqh89k%24tob%241%40ger.gmane.org
In-Reply-To: <loom.20090326T184207-345@post.gmane.org>

```
On Thursday 26 March 2009 19:51, Carlo wrote:

> Hi,
> I'm going to work on a web project with a friend. We will host our code on a
> server and my idea was to set up a git repository (maybe using gitosis) so that
> we could work on our machines and push the changes to the server.
> 
> He said that it would be complicated, because if he's going to try some changes
> to show me on the fly he just can't. I mean, he would like to work on the code
> directly on the server, so that he can change the code, save and I can just
> refresh the page from my browser and see what he did.
> 
> Using git he should save, commit, add, push... so it's a bit longer.
> 
> Is there a nice compromise? Or a better way to use git for such a task or web
> development in general?

You could try using gitweb to expose the local repository directly.

If the web pages don't rely on hard-coded paths (i.e. all links are
relative) you should actually be able to navigate the tentative website
in plain blob view mode, for any given commit or branch.


-- 
Giuseppe "Oblomov" Bilotta

```
