Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Git Essentials ??? Second Edition

You're reading from   Git Essentials ??? Second Edition Create, merge, and distribute code with Git, the most powerful and flexible versioning system available

Arrow left icon
Product type Paperback
Published in Nov 2017
Publisher Packt
ISBN-13 9781787120723
Length 238 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Ferdinando Santacroce Ferdinando Santacroce
Author Profile Icon Ferdinando Santacroce
Ferdinando Santacroce
Arrow right icon
View More author details
Toc

Using Git with a Subversion repository

Using Git as a client of Subversion can raise some confusions, due to the flexibility of Git as compared to the more rigid way Subversion organizes files.
To be sure to maintain a Subversion-friendly way of work, I recommend you follow some simple rules.

First of all, ensure that your Git master branch is related to the trunk one in Subversion; as we already said, Subversion users usually organize a repository in this way:

  • A /trunk folder, the main one
  • A /branches root folder, where you put all the branches, each one located in a separated subfolder (for example, /branches/feat-branch)
  • A /tags root folder, where you collect all the tags you made (for example, /tags/v1.0.0)

To adhere to this layout, you can use the --stdlayout option when cloning a Subversion repository:

$ git svn clone <url> --stdlayout 

In this manner, Git will hook...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime