Git never ceases to amaze me!

At work, we use Subversion for version control. SVN is really good - but it disturbs my workflow which is 'Commit Early, Commit Often'. People create builds three or four times a day for testing and obviously they don't want my Work In Progress commits in that. They expect me to commit only after a feature is completely done. That was handicapping my pace of development.

So, the solution - Enter git-svn :D

git-svn allows me to checkout a subversion repo as a git repository. Since my working copy is a git repo now, I get all the fantastic features of git. At the start, I was using git in a very minimal way - make commits locally, created local branches and seamlessly switched between them. Even that helped greatly to my development pace.

As days pass by, I keep on discovering lot of gems in git - which make me like,

"Holy F, How did I exist without this these many days??" :P

Discovering git squash is one such incident. git bisect was another one. Today is one such day.

At work we use Target Process for project management. Issues, Requests, Feedbacks, Usecases everything is created in TargetProcess and we use the related Id in our commits. We don't commit anything to SVN without mentioning TargetProcess artifact Id.

There is a new feature which came as a request through email - and I have started development on it - made a few commits to my git repo. That feature was not yet added to the TP, so I can't push it to the SVN repo. While this was being done, another important bug fix came and I had to fix it immediatly and push it to the SVN repo. Now the unfinished feature's commits are there and on top of it there is this urgent bug fix commit. I need to push only the bug fix commit to the SVN repo without pushing any of the new feature's commit. I could've done the development of the new feature in a local branch - keeping the master clean. But that is not a option now. Damage is done. What I did is this:

  • I converted both the bugfix and new feature changes into git-am patches.
  • Deleted both the commits and made the master as clean slate.
  • Applied only the bug fix commit.
  • Moved the other feature commits to a separate branch.
  • Pushed to bug fix to the SVN.
  • Be happy!

I know this is trivial. May be some other better way could be there. But, the power and flexibility of git just made me fall in love with it all over again :D git never ceases to amaze me!

Published at : Thursday Mar,28 2013 at 00:20 | Tags : hacking, git, Subversion, svn, | View Comments
Thanks to stylesen

On August 14,2010 Blue genie technologies conducted a open source software conference in Madurai. I handled a talk on Version control systems and Subversion basics in that conference. Mr.Senthil Kumaran from Collabnet was asked to deliver a talk on version control systems on the event. But due to some personal issues he couldn't come to the conf and he gave the opportunity to me to handle the same talk on that day!

My talk started around 10.30 AM and I talked about half an hour - explaining what is a version control system and why we need it etc. I explained the basic differences about the distributed and centralized version control systems. Then I introduced Subversion to the crowd and showed a very basic usage of subversion command line client.

There were around 1000 audience who were mostly students from in and around madurai! The feedback I got from the audience was, the talk was more technical explaining the versioning concepts, but lacked few very basic examples which could reach that target audience :( This is the lesson I learnt, so that I will prepare my future presentations by keeping the target audience in mind.

The slides I used for the presentation are here ->

Thanks to stylesen and Blue Genie Technologies for giving me this opportunity.

PS: I have also planned to give a talk on introduction to Django on that conf alongside with Mr.Bala Murugan who handled Web Programming with Python, but due to improper time management by the organizers I didn't get time to do that talk.

Published at : Wednesday Aug,25 2010 at 23:59 | Tags : presentation, talk, Subversion, | View Comments
Browse Archives
I am..
Azhagu Selvan SP
Atheist, FOSS enthusiast,
Pythonist, Student
Creative Commons License