Source code management

From FreeCAD Documentation
Revision as of 11:33, 21 December 2011 by Jriegel (talk | contribs) (Created page with 'In future our main source code management tool will be git. This article explain how to use it and the general rules apply in case of FreeCAD. == Transition phase == For a whil…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In future our main source code management tool will be git. This article explain how to use it and the general rules apply in case of FreeCAD.

Transition phase

For a while we keep up the SVN repository on sf.net. It is possible to commit changes in SVN and Git. I will do from time to time a merge from one to the other via a gatekeeper repository.

This is only feasibly as a transition. I strongly recommend the developers to switch to git, as soon a possible!

Access

To access a Git repository, configure your Git client as follows :

 git://free-cad.git.sourceforge.net/gitroot/free-cad/free-cad  (read-only)
 ssh://USERNAME@free-cad.git.sourceforge.net/gitroot/free-cad/free-cad (read/write) 

Authentication

The read-only access does not prompt for a password.

The read/write access uses your ssh password or ssh key to authorize your access. To perform write operations, your project administrator must have granted you write access to the repository. Getting Started

Note: - For all examples below, "USERNAME" represents your SourceForge.net user account.


How to clone the repository

You can simply clone your remote repository and get working:

git clone ssh://USERNAME@free-cad.git.sourceforge.net/gitroot/free-cad/free-cad
cd REPONAME

The first time you try connecting to the free-cad.git.sourceforge.net host, you should see a message similar to the following:

The authenticity of host 'free-cad.git.sourceforge.net (216.34.181.91)' can't be established. RSA key fingerprint is 86:7b:1b:12:85:35:8a:b7:98:b6:d2:97:5e:96:58:1d. Are you sure you want to continue connecting (yes/no)?

Before typing 'yes' to accept the host fingerprint, ensure the fingerprint is correct for the host. You can find a listing of SSH host keys in the SSH Host Key Fingerprints list. If you receive a host key warning, please contact the SourceForge.net team.

Setting your git username

Users should commit to their project repository using their SourceForge.net username. If that is not already set globally, you can set it locally for the current Git repository like this:

git config user.name "YOUR NAME" git config user.email "USERNAME@users.sourceforge.net"

You can now use some combination of "git add" and "git commit" commands to create one or more commits in your local repository.

How to push a local repository

git push origin master