views:

66

answers:

4

Hello!

I am a "GIT newbie" as of starting with Heroku, and I'm interested in knowing what would be best practice in how to work with it.

As of now my site has one production environment and one staging environment.

However I'm only using the most basic GIT commands, i e:

git add .
git commit -m "some changes"
git push production master

for instance…

Lately though I've been reading about working with branches and I'm understanding that this is the way to go.

What I need help with though is understanding how to create a development branch, pushing it to either staging or production and if stuff goes bad reverting to my latest working branch.

Any help with code on this or links to tutorials would be greatly appreciated.

Cheers!

+1  A: 

These would be my first steps:

  1. google "git for computer scientists"
  2. Gitcasts.org
  3. gitready.com
  4. progit.org/book

Check here for instructions.

Be on the #git channel on IRC (http://webchat.freenode.net/)

I'm available on twitter under the same ID to help you as well :)

Cheers,

Adam

adymitruk
Thanks for the tips!
Erik
the git dzone refcard is nice, too.
revdrjrr
I'm really liking the IRC these days.. lots of people on all the time.. answers come quicker than any other forum.. YMMV :) and watch out for RTFM responses ;)
adymitruk
+1  A: 

I found this article in particular to be very helpful in organizing my git repo for exactly this kind of situation:

http://nvie.com/posts/a-successful-git-branching-model/

tfe
+2  A: 

Railscasts has some good, if dated, videos on git as well. They were a nice icebreaker so I wasn't so intimidated by git.

Mike Bethany
A: 

you might want to check out the Git Cheat Sheet :)

pageman