Difference between revisions of "Bering-uClibc 4.x - Developer Guide - Hints and Tips for using Git SCM"

From bering-uClibc
Jump to: navigation, search
(Created initial skeleton based on Mike Noyes email 2011-02-03)
 
(Added reference to GitWeb)
Line 19: Line 19:
  
 
==Getting Started==
 
==Getting Started==
The first step is to ensure you have the Git client software installed on your build host.
+
The very first step is probably to browse the web-based interface to the SourceForge-hosted Git repository at the [http://leaf.git.sourceforge.net/ LEAF project GitWeb] to familiarize yourself with the structure.
 +
 
 +
The next step is to ensure you have the Git client software installed on your build host.
 
On Red Hat-derived Linux distributions this is accomplished with:
 
On Red Hat-derived Linux distributions this is accomplished with:
 
  yum install git
 
  yum install git

Revision as of 12:31, 5 February 2011

Hints and Tips for using Git SCM
Prev Bering-uClibc 4.x - Developer Guide


Background

The LEAF project successfully used the CVS (Concurrent Version System) Source Code Management (SCM) tool, hosted by SourceForge, for many years. Various developers suggested switching to an alternative SCM such as Subversion or Git (see in particular the email thread "Talks about versioning system" on the leaf-devel mailing list in late September 2010) but the consensus was that CVS met all the basic requirements and a change of SCM would only divert resources away from other more important tasks.

The consensus view changed in late January / early February 2011, when the SourceForge systems were compromised and CVS proved particularly difficult to restore (see the SourceForge report here. In particular, the indication was that the SourceForge-hosted CVS service would be retired.

The SourceForge-hosted Git SCM service was selected as the new SCM for Bering-uClibc 4.x early in February 2011.


Getting Started

The very first step is probably to browse the web-based interface to the SourceForge-hosted Git repository at the LEAF project GitWeb to familiarize yourself with the structure.

The next step is to ensure you have the Git client software installed on your build host. On Red Hat-derived Linux distributions this is accomplished with:

yum install git

Next, you will want to copy ("clone") the SourceForge-hosted Git repository. The naming convention for project repositorie URLs is documented on the SourceForge Git page. In our case "PROJECTNAME" = "leaf" and "REPONAME" = "leaf" so the repository is accessed as:

Read-only 
git://leaf.git.sourceforge.net/gitroot/leaf/leaf
Read-write 
ssh://USERNAME@leaf.git.sourceforge.net/gitroot/leaf/leaf

The examples that follow assume you want read-write access and will therefore use the second variant. Obviously you need to replace "USERNAME" with your own SourceForge username.

To actually create a copy of the SourceForge-hosted repository change to a suitable directory on your build host and run the following command:

git clone ssh://USERNAME@leaf.git.sourceforge.net/gitroot/leaf/leaf

This creates a new directory "leaf" under the current directory which contains a full copy of the "leaf" repository on SourceForge.


Git for CVS Users

For anyone familiar with CVS, here are the equivalent Git commands for some basic SCM tasks:

Task CVS Command Git Command
Check in a modified file cvs commit -m "Log Message" filename TODO


Further Reading



Prev Up