Track your changes to an open-source project with git: Difference between revisions

From Bitpost wiki
No edit summary
No edit summary
Line 1: Line 1:
== Purpose ==
Here are some of the projects on which I have overlaid my code, with the help of git:
Here are some of the projects on which I have overlaid my code, with the help of git:


Line 8: Line 10:


All of these currently use subversion, which git can read from and write to.  Some of them (read: "mythtv") are insanely active.  Git can help you remain sane while you try to overlay your changes on top of a moving target.
All of these currently use subversion, which git can read from and write to.  Some of them (read: "mythtv") are insanely active.  Git can help you remain sane while you try to overlay your changes on top of a moving target.
== Overview ==
Any experienced developer should be familiar with source control.  Typical source control keeps your code in a central location, and each developer "checks out" file(s) when they want to do modifications.  Most people who have used this type of system have experienced problems getting code because someone else has "checked out" the file(s) they want.
Open-source culture has no tolerance for this.  Typical source control for open-source projects does not rely on checking out files.  Anyone can grab the files and modify them at any time.  Then conflicts are dealt with when you want to commit your files back into the central repository.  But this can lead to real headaches merging your changes into a project that has completely changed from under you while you were working on it.
git was born to explode all these limitations into non-existence.  The only price is to step way back and adjust your way of thinking.  Code flows in every direction in the world of git, and every developer is her own central repository.
== Implementation ==


I have used two approaches:
I have used two approaches:

Revision as of 13:14, 6 September 2010

Purpose

Here are some of the projects on which I have overlaid my code, with the help of git:

  • mythtv
  • ampache
  • wordpressmu
  • recess
  • a proprietary project hosted privately behind an openvpn connection

All of these currently use subversion, which git can read from and write to. Some of them (read: "mythtv") are insanely active. Git can help you remain sane while you try to overlay your changes on top of a moving target.

Overview

Any experienced developer should be familiar with source control. Typical source control keeps your code in a central location, and each developer "checks out" file(s) when they want to do modifications. Most people who have used this type of system have experienced problems getting code because someone else has "checked out" the file(s) they want.

Open-source culture has no tolerance for this. Typical source control for open-source projects does not rely on checking out files. Anyone can grab the files and modify them at any time. Then conflicts are dealt with when you want to commit your files back into the central repository. But this can lead to real headaches merging your changes into a project that has completely changed from under you while you were working on it.

git was born to explode all these limitations into non-existence. The only price is to step way back and adjust your way of thinking. Code flows in every direction in the world of git, and every developer is her own central repository.

Implementation

I have used two approaches:

  1. Setting up your own public repo on top of an open-source project - this is thorough but probably overly complex.
  2. Work on an open-source project from anywhere - this is my current standard approach.