That’s how we roll (git) in the Shire!
Posted by Jens Pettersson on August 19th, 2010This post is about how we try to use git in our current project. At the moment we’re three coders involved and we’re pretty early in this project.
Yesterday I was working on my local branch with a couple of features while the others pushed some changes to our remote master wich I wanted to have in my branch. This is how I did it:
First, I made sure I had the latest version on my local master:
§ git pull
Then I did a rebase onto my feature branch:
§ git rebase master my_branch
The following message from git is pretty self explanatory on what’s happening:
First, rewinding head to replay your work on top of it…
Applying: My first commit messageApplying: My second commit message
Applying: Frodo was here!!1!
After that I merged my branch with my local master and then pushed it to github. Of course I didn’t have to push it, but it wouldn’t been nice to loose a days work if something had happened.
We could also have used remote branches for this, but it doesn’t feel necessary at this point.
Feel free to drop us a comment on how you use git in your projects! We aren’t claiming that this is the best way to go, it just works for us right now.
Shire out!
//J
Recent Comments