I'm used to git and I like it very much, but one of my client is (still?) using subversion, I don't really now about svn, but I know there a git-svn package.
I know it's possible to fetch a repo from svn with git, but can i use git instead of svn and still commit, and "push" to the central svn server?
I want to use git and not svn if I can can you point me any tutorial to do so?
Thank you
EDIT:
I actually don't care to fetch ALL the commits, only the 10/20 previous one would be enough as the application is in a working state and that's only about doing improvements so I will only fetch all the commit history if it's actually needed.
No interaction between them. Just ignore the . git folder for SVN and the . svn folder for Git and you should be fine.
The difference between Git and SVN version control systems is that Git is a distributed version control system, whereas SVN is a centralized version control system. Git uses multiple repositories including a centralized repository and server, as well as some local repositories.
SVN is better than Git for architecture performance, binary files, and usability. And it may be better for access control and auditability, based on your needs.
git-svn
provides a bridge from Git and SVN. It will behave like vanilla Git locally, but as soon as you try to push or pull your changes to or from master, it gets completely different.
Instead of doing a push, you will use git commit
to commit locally, and git svn dcommit
to push your local commits to SVN.
The git-svn documentation explains how to pull from a SVN repository. Note that it is extremely slow (compared to normal git) because it fetches every revision from SVN. See the examples at the bottom of the documentation.
Here it a typical way I've used it:
git svn clone http://svn.example.com/project -T trunk -b branches -t tags
- The URL is your SVN repo, and you specify the -T, -b, and -t switches to specify sub paths in your SVN directory. Git will then use these SVN directories to look for branches and tags, and trunk as master.git add...
to stage your changesgit commit...
to commit your changes locally.git svn dcommit
to push the local commits to SVN. For each local commit, Git will make these separate commits on the SVN server.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