# Somewhat OT: trying to git cozy with git

**URL:** <https://www.ruby-forum.com/t/somewhat-ot-trying-to-git-cozy-with-git/138992>\
**Category:** Rails\
**Created:** [May 29, 2008, 8:13pm UTC](https://www.ruby-forum.com/t/somewhat-ot-trying-to-git-cozy-with-git/138992 "2008-05-29T20:13:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [May 29, 2008, 8:13pm UTC](https://www.ruby-forum.com/t/somewhat-ot-trying-to-git-cozy-with-git/138992/1 "2008-05-29T20:13:13Z")

</div>

I’ve been using Subversion since I started doing Rails. I wouldn’t say  
I like it, but it is “comfortable” at this point.

Now that the Rails core team seems to be pushing the Rails community in  
the direction of Git as the “norm”, I’m tempted to make the move too,  
but there is one aspect of Git that has me feeling a bit “un-cozy”.

I’m used to having a central repository sitting out on my server, that I  
can always use to get an up-to-date version of my work, regardless of  
which one of my machines I’m using or where I am on the planet.

How are folks that are used to the central repository way of life  
adapting to Git? Seems like you would have to remember to always do  
everything twice. Once to update your local Git, and then again to push  
it out to the server.

Is there some other way of working with Git that makes it more like the  
central repository workflow I’m used to?

I’ve seen the peepcode and railscast episodes on git. Any other good  
references you want to share?

thanks,  
jp

---

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [May 29, 2008, 9:30pm UTC](https://www.ruby-forum.com/t/somewhat-ot-trying-to-git-cozy-with-git/138992/2 "2008-05-29T21:30:55Z")

</div>

> Is there some other way of working with Git that makes it more like the  
> central repository workflow I’m used to?

You could always add “git push” to your .git/hooks/post-commit file.  
That way, whenever you commit locally, it’s automatically pushed to your  
central server.

- D

---

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [May 29, 2008, 10:16pm UTC](https://www.ruby-forum.com/t/somewhat-ot-trying-to-git-cozy-with-git/138992/3 "2008-05-29T22:16:20Z")

</div>

On Thu, May 29, 2008 at 3:30 PM, Danny B.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Is there some other way of working with Git that makes it more like the  
> > central repository workflow I’m used to?
> 
> You could always add “git push” to your .git/hooks/post-commit file.  
> That way, whenever you commit locally, it’s automatically pushed to your  
> central server.

Although I think that there are reasons not to do that.

It’s advantageous at times to keep a local set of branches which are  
not available to others before you release them. Once you’ve made  
them visible to others you don’t want to do things like rebase which  
can be very nice in keeping a parallel thread in development in sync.

–  
Rick DeNatale

My blog on Ruby  
[http://talklikeaduck.denhaven2.com/](http://talklikeaduck.denhaven2.com/)

---

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [May 29, 2008, 10:25pm UTC](https://www.ruby-forum.com/t/somewhat-ot-trying-to-git-cozy-with-git/138992/4 "2008-05-29T22:25:37Z")

</div>

Rick Denatale wrote:

> On Thu, May 29, 2008 at 3:30 PM, Danny B.  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > > Is there some other way of working with Git that makes it more like the  
> > > central repository workflow I’m used to?
> > 
> > You could always add “git push” to your .git/hooks/post-commit file.  
> > That way, whenever you commit locally, it’s automatically pushed to your  
> > central server.
> 
> Although I think that there are reasons not to do that.
> 
> Rick DeNatale

Might be OK for me though. The projects in question are likely to be  
ones where I’m the only developer. I have multiple machines that I work  
from though, and want to always have access to the work I did on one of  
the other ones.

thanks,  
jp

---

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [May 30, 2008, 3:34pm UTC](https://www.ruby-forum.com/t/somewhat-ot-trying-to-git-cozy-with-git/138992/5 "2008-05-30T15:34:18Z")

</div>

The cool thing is that you can setup remotes of your other machines  
and pull from those as well

On May 29, 9:25 pm, Jeff P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![jeffpritchard](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/43a26b/32.png) [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Post date:** [May 30, 2008, 4:19pm UTC](https://www.ruby-forum.com/t/somewhat-ot-trying-to-git-cozy-with-git/138992/6 "2008-05-30T16:19:12Z")

</div>

I have these _exact_ thoughts, too; which keeps me coming back to  
Subversion as the way to go.

Also, [Rubyforge.org](http://Rubyforge.org) has svn access - however, I cannot access it  
through work’s blocked firewall. Which makes me wonder if git will  
help with that, being a repository on a thumbdrive, etc.

But in terms of always having “one place” to stuff code that you can  
forget about and get at from a different location - I can’t think of  
how Git will solve that question/need - especially when it is just one  
developer on a personal “sandbox” project.

On May 29, 4:25 pm, Jeff P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
