![]() ![]() Git rebase master #apply commits of master on bug123 (not necessary in this case as I did nothing in master) Git checkout -b bug123 #create bug fix branch Git stash #put not yet committed stuff aside Git checkout -b dsl #create the dsl branch and move to it When I was done with the bug fix, I applied it on master and the dsl branch and resumed my work there. created a new branch off master named bug123 and fixed the bug. No problem, I literally stopped working on the new feature, put stuff aside (git stash). While working on it, I found a bug in the existing query engine. I branched master to dsl and started to work, including committing small chunks of work (more on this later). I was working on a new feature for Hibernate Search's query DSL. I am talking about the ability to work on several subjects in parallel without complex settings. I am not necessarily talking about the ability to work offline on an island (though that's nice). The absolute coolest feature is the ability to work in total isolation on a given topic for very cheap. Forget sharing repos when you use git-svn unless you are abandoning SVN and are doing a one time import. That will be a mess because git-svn rewrites the commit unique identifiers. One golden rule: you cannot share a Git repository and pull changes back with someone else AND use it to commit in a SVN repository. Apparently it is possible to aggregate Git repositories via the notion of superproject but I have not tried. Hibernate Core (which contains all the modules)Īll of these have generally independent release cycles and version numbers.For example, for Hibernate, I've several Git repos: The rule is import the biggest unit that you tag / branch in isolation in SVN. You will typically get several Git repos per SVN repo. I do recommend to import one SVN project per Git repository. In practice for me, I dcommit every 4 to 6 hours. People who share frequently will continue to do so, people who don't still don't and should be fired. Many people, especially in the open source community, consider DVCS as a bad thing because it encourages committers to keep their work locally and not share with others. To commit your set of local commits to SVN, do To update your Git repo with the new commits from SVN do The good news is that you can stop it and restart later. The next step is to fetch all the information. Git config svn.authorsfile ~/dir/myauthors.txt Don't be afraid to miss a couple of logins, if you do, git-svn will stop and ask you to add it. If you want to do that, you need to create this file. ![]() In the logs, every time git-svn finds agaulois, it converts it to Asterix. You can optionally create a file containing a conversion between SVN logins and the committers names and email addresses Git svn init -trunk=my/svn/repo/project/trunk/ \ ![]() Due to a bug in git-svn for https imports, I am using Git 1.6.5.1 and not the 1.7.1 version. Here is a small tutorial section for people willing to import a project from SVN to Git and keep a bridge between the two. I't hard for me to say that but since the move I do enjoy committing stuffs (I know, that's pretty scary). I am not constrained by the tool in any way: If I had to summarize, Git gives me more freedom than SVN. use case: writing better commits and commit histories. ![]() how to import a SVN repo into Git (feel free to skip this tutorial of you are interested in what I liked in Git compared to SVN).This is not a post on why merging is superior in Git compared to SVN (this is something you need to experience), it's a post on how Git is making my life easier. While nothing replace actually trying it, I thought it was worth the time to explain what I like about this new tool to help people jump too. Note that I am using git-svn so I don't benefit from all the power of DVCSes. Rationally convincing someone that a DVCS is better is pretty hard because overall the life in SVN land is not that bad or does not appear to be. I've switched from SVN to Git (more git-svn actually) close to a month ago and that had to be a leap of faith. Git: how my life has improved since last month when I used SVN ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |