Project GIT Information

From Trinity Desktop Project Wiki
Jump to navigation Jump to search

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 from mirror

NOTE: Mirror of GIT repository is used for read-only access (i.e. for non-developers). For pushing changes to GIT is needed to use master repository or setup separate url for pushing changes.

git clone https://mirror.git.trinitydesktop.org/gitea/TDE/tde
git clone https://mirror.git.trinitydesktop.org/gitea/TDE/scripts tde/scripts
cd tde
./scripts/switch_all_submodules_to_head_and_clean anonymous

To check out the entire source tree from master repository

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
git clone https://<username>@scm.trinitydesktop.org/scm/git/scripts tde/scripts
cd tde
./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 --rebase

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