On Thursday, July 19, 2012 6:14:17 AM UTC+2, PeterSteele wrote:
> We're starting a new project and will be using git for our source code
> management system. We're all previous SVN users and have not used git
> before. I'm sure this question has been asked many times before and I
> apologize for asking it again: What is the convention for setting up a new
> project in git? In SVN, the convention is to call the main branch "trunk"
> and branches are created under a directory called "branches" (e.g.
> branches/1.0 for the first release branch). There is also a "tags"
> directory used for labeling key snapshots of the trunk (or even release
> branches), without actually creating a branch.
> From what I've read, it appears that the convention is to call the main
> trunk "master". Is this correct? What's the convention for release branches
> and tags? Are there any other git specific repository conventions that we
> should follow?
The things you know about branches and tags from Subversions doesn't really
apply so well to Git. I recommend you have a read through the Git book
before you go to deep into it: http://git-scm.com/book
To answer your question, there aren't really many strict conventions in
Git. I can only think of two:
- By default, there's a branch in a freshly created repository called
'master', which is fine to use the way you used 'trunk' for SVN.
- When you clone a repository, it will be configured with a remote
called 'origin', being the repository you cloned from.
So a majority of cases where you use Git, you will be working in a master
branch, which is set up to track the remote branch origin/master.
There are of course different ways to define master: I reckon most use it
for "the latest greatest development" (bleeding edge), while others define
it as "the latest code that is ready to go into production" (rock stable).
The most famous suggestion of conventions I guess is this
That said, there are also simpler models, like the one they use at
And then there are the ones coming straight from SVN, which use one and
only one branch (being master). They avoid branches and merge-commits by
always getting the latest changes in master with "git pull --rebase", and
push very often.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To view this discussion on the web visit
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to
For more options, visit this group at