wiki:Developer/Git

Version 16 (modified by Cdcs, on Dec 21, 2011 at 8:30:19 PM) (diff)

RTEMS GIT Repository

RTEMS project is currently in the process of migrating its CVS repositories to GIT. A git repository has already been setup and is currently available for testing at http://git.rtems.org/. The conversion plan for this undergoing migration can be consulted in the CVS to GIT wiki page. The git repository is available read-only to the public at large. Only a small subset of people have write permission, but everyone is welcome to commit a patch with proper licensing.

Why git?

Git is a distributed revision control system with an emphasis on speed and data safety. With git revision control system each user has a full featured copy of the main repository. Each revision control operation is done in the local repository and can be later shared using patches or by direct push to the main repository.

RTEMS GIT Repositories

The following modules are in the RTEMS GIT Repository and currently actively used for development. The complete list of available development modules can be found at http://git.rtems.org/

  • rtems.git - RTEMS Itself
  • Examples
    • examples.git - RTEMS Examples (merges all other non-networked example collections)
    • network-demos.git - Example RTEMS Networking Programs
  • rtems-testing.git - Helpful scripts for testing. Includes Simulator Scripts, Coverage Testing help, CVS helpers, RTEMS atesting, and GCC testing aids.
  • rtems-addon-packages.git - Free software libraries that have been ported to RTEMS including AVL, TCL, ncurses, readline, and zlib.
  • rtems-graphics-toolkit.git - Graphic support libraries for RTEMS.
  • rtems-schedsim-git - Scheduling Simulator

GIT Access

Browse the GIT Repository Online

You can browse our GIT history of all available repositories online by accessing http://git.rtems.org/.

Using the GIT Repository

The following examples demostrate how to use the RTEMS' git repo. These examples are provided for the main rtems module, but they are also valid for the other modules.

First we need to obtain our own local copy of the RTEMS git repository:

 git clone git://git.rtems.org/rtems.git rtems

This command will create a folder named rtems in the current directory. This folder will contain a full featured rtems' git repository and the current HEAD revision checked out. Since all the history is available we can checkout any release of RTEMS. Major RTEMS releases are available as separate branches in the repo.

To see all available remote branches issue the following command:

 git branch -r

We can checkout one of those remote branches (e.g. rtems-4.10 branch) using the command:

 git checkout -b rtems410 origin/rtems-4-10-branch

This will create a local branch named "rtems410", containing the rtems-4.10 release, that will track the remote branch "rtems-4-10-branch" in origin (git://git.rtems.org/rtems.git). The 'git branch' command prints a list of the current local branches, indicating the one currently checked out.

If you want to switch between local branches:

 git checkout <branch-name>

With time your local repository will diverge from the main RTEMS repository. To keep your local copy up to date you need to issue:

 git pull origin

This command will update all your local branches with any new code revisions available on the central repository.

Learn more about Git

Links to site with good Git information.

Attachments (1)

Download all attachments as: .zip