Difference between revisions of "Project GIT Information"

From Trinity Desktop Project Wiki
Jump to navigation Jump to search
imported>Eliddell
(Created page with "Category:Developers This page provides instructions regarding the project's GIT repositories ==What is GIT?== GIT, short for Global Information Tracker ([http://kerneltr...")
 
imported>TimothyPearson
m (Use GIT over HTTPS for security/authenticity)
Line 26: Line 26:
 
'''NOTE: ‘<username>@‘ should be removed from commands listed below if read-only anonymous (i.e. non-developer) access is desired.'''
 
'''NOTE: ‘<username>@‘ should be removed from commands listed below if read-only anonymous (i.e. non-developer) access is desired.'''
   
<nowiki>git clone http://<username>@scm.trinitydesktop.org/scm/git/tde</nowiki>
+
<nowiki>git clone https://<username>@scm.trinitydesktop.org/scm/git/tde</nowiki>
 
cd tde
 
cd tde
 
git submodule init -- scripts
 
git submodule init -- scripts
Line 36: Line 36:
 
Due to the use of submodules, in order to checkout the TDE tree with GIT version >= 1.6.5 the ‘--recursive‘ option must be given:
 
Due to the use of submodules, in order to checkout the TDE tree with GIT version >= 1.6.5 the ‘--recursive‘ option must be given:
   
<nowiki>git clone --recursive http://<username>@scm.trinitydesktop.org/scm/git/tde</nowiki>
+
<nowiki>git clone --recursive https://<username>@scm.trinitydesktop.org/scm/git/tde</nowiki>
   
 
'''NOTE: For public read-only access use "anonymous" as the username.'''
 
'''NOTE: For public read-only access use "anonymous" as the username.'''
Line 42: Line 42:
 
You may also wish to skip the numerous password prompts that will appear on first checkout; these two tasks can be accomplished with the following command:
 
You may also wish to skip the numerous password prompts that will appear on first checkout; these two tasks can be accomplished with the following command:
   
<nowiki>GIT_ASKPASS=echo git clone --recursive http://anonymous@scm.trinitydesktop.org/scm/git/tde</nowiki>
+
<nowiki>GIT_ASKPASS=echo git clone --recursive https://anonymous@scm.trinitydesktop.org/scm/git/tde</nowiki>
   
 
===To check out a single project===
 
===To check out a single project===
Line 48: Line 48:
 
Find the project you are interested in on the public web interface
 
Find the project you are interested in on the public web interface
   
<nowiki>git clone http://<username>@scm.trinitydesktop.org/scm/git/<project name></nowiki>
+
<nowiki>git clone https://<username>@scm.trinitydesktop.org/scm/git/<project name></nowiki>
 
cd <project name>
 
cd <project name>
 
git submodule init
 
git submodule init

Revision as of 22:29, 7 July 2014

This page provides instructions regarding the project's GIT repositories

What is GIT?

GIT, short for Global Information Tracker (among other things) is a distributed version control system. It is the system in which the TDE code is stored, and allows multiple developers to work collaboratively without accidentally erasing each other's work. It also maintains a history of every single change that was ever made to the TDE source code.

Terms you will need to know:

Check out: This is the act of retrieving an editable copy of the source code from our servers. Unless you are a TDE developer you will not be able to commit any changes you make to our servers, but you can generate patches containing your changes from the code you originally checked out.

Commit: This is the act of uploading your modified source code to the project's server. When this occurs, your changes become part of the codebase that is being developed, and will therefore be accessible by anyone who downloads a copy of the source code.

Module: A single GIT repository, in the context of the TDE project usually an application or library.

Submodule: A module that resides within the directory structure of another module, and is version locked by the outer module. In the context of the TDE project, common build directories (admin/ and cmake/) are inserted as submodules into each application and library. This structure allows a change made to the submodule source code to be automatically propagated to all modules that use the submodule.

HEAD: This is the latest version of the source code available, and therefore is the version that any changes will be applied to or differences will be calculated from. In most cases HEAD will be the latest version available on the TDE project's servers, however if you have made any local commits the last commit made will be used as HEAD.

Using GIT

To check out the entire source tree

With GIT version < 1.6.5

NOTE: ‘<username>@‘ should be removed from commands listed below if read-only anonymous (i.e. non-developer) access is desired.

git clone https://<username>@scm.trinitydesktop.org/scm/git/tde
cd tde
git submodule init -- scripts
git submodule update -- scripts
./scripts/switch_all_submodules_to_head_and_clean

With GIT version >= 1.6.5

Due to the use of submodules, in order to checkout the TDE tree with GIT version >= 1.6.5 the ‘--recursive‘ option must be given:

git clone --recursive https://<username>@scm.trinitydesktop.org/scm/git/tde

NOTE: For public read-only access use "anonymous" as the username.

You may also wish to skip the numerous password prompts that will appear on first checkout; these two tasks can be accomplished with the following command:

GIT_ASKPASS=echo git clone --recursive https://anonymous@scm.trinitydesktop.org/scm/git/tde

To check out a single project

Find the project you are interested in on the public web interface

git clone https://<username>@scm.trinitydesktop.org/scm/git/<project name>
cd <project name>
git submodule init
git submodule update

To discard all local changes and update to the latest HEAD version

cd <top level tde directory>
./scripts/switch_all_submodules_to_head_and_clean

To nondestructively update the current repository to the latest HEAD version

git pull

NOTE: This does NOT update supermodules or submodules of the current repository

To commit all changes made to the complete source tree

cd <top level tde directory>
./scripts/commit_all_submodules

To commit changes in the current repository to the TDE servers

git commit -a
git push origin HEAD

NOTE: This does NOT commit supermodules or submodules of the current repository