SVN to Git Branch/Tag/Trunk
I am making the leap from SVN to Git (though, my respect for SVN will still hold) and I had a few questions for some SVN to Git terminology. In SVN, many repositories are setup like this:
- trunk : The place where all of the main development occurs - tag : Storing versions of major releases or important milestones - branch : Where smaller "branch" development occurs as to not conflict with the main development occurring in the trunk, then is later merged into the trunk
What are the standard convention names for branch/tag/trunk in Git?
Thank you for your time.
Git does not force you to use a specific structure for your project. All information which is important for git itself will be stored in the hidden .git directory. To list or see you branches and tags use the git commands:
git branch git tag ...
to get further information use the git help command or have a look at this free book
- SVN trunk --- Git master (refs/heads/master)
- SVN branches/* --- Git branches (refs/heads/*)
- SVN tags/* --- Git tags (refs/tags/*)
There aren't any direct analogues really. SVN uses a directory structure to store copies directly in the repository to allow for branches and tags. Therefore there is concept in creating a structure to hold these copies in the repository.
Git on the other hand maintains this as meta information and treats everything as a snapshot of a point in "time" as identified by a hash:
Subversion marks certain checkpoints in history through copies, the copy is usually placed in a directory named tags. Git tags are much more powerful. The Git tag can have an arbitrary description attached (the first line is special as in the commit case), some people actually store the whole release announcements in the tag descriptions. The identity of the person who tagged is stored (again following the same rules as identity of the committer). You can tag other objects than commits (but that is conceptually rather low-level operation). And the tag can be cryptographically PGP signed to verify the identity (by Git's nature of working, that signature also confirms the validity of the associated revision, its history and tree).
So basically there is no "repository structure"; there is only the project structure (ie. what you would find in trunk, a branch, or a tag in your SVN repo)