Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN to Git Branch/Tag/Trunk

Tags:

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.

like image 506
Oliver Spryn Avatar asked Oct 30 '12 15:10

Oliver Spryn


People also ask

What is branch tag and trunk in SVN?

A tag is just a marker. Trunk would be the main body of development, originating from the start of the project until the present. Branch will be a copy of code derived from a certain point in the trunk that is used for applying major changes to the code while preserving the integrity of the code in the trunk.

What is the difference between trunk and branch in SVN?

The trunk is the main line of development in a SVN repository. A branch is a side-line of development created to make larger, experimental or disrupting work without annoying users of the trunk version.

How do I checkout tag in SVN?

As such, to checkout a tag, you check out with your URL referencing the directory. To commit back that tag, you do a normal commit. To commit back to a different tag, you svn copy the files into the new "correct" tag directory, which you might have to mkdir ...; svn add (dir) prior to the svn copy.


2 Answers

  • SVN trunk --- Git master (refs/heads/master)
  • SVN branches/* --- Git branches (refs/heads/*)
  • SVN tags/* --- Git tags (refs/tags/*)
like image 80
Dmitry Pavlenko Avatar answered Sep 29 '22 02:09

Dmitry Pavlenko


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

like image 42
Nicoretti Avatar answered Sep 29 '22 02:09

Nicoretti