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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With