Skip to content
Oleg Hahm edited this page Feb 12, 2014 · 8 revisions

Git cheatsheet

How to checkout the (read-only) git repository

git clone git://github.com/RIOT-OS/RIOT.git

If you require write access, please contact the RIOT-team via email.

You may additionally want to checkout the platform configuration and initialization code from

git clone git://github.com/RIOT-OS/boards.git

or

git clone git://github.com/RIOT-OS/thirdparty_boards.git

Exemplary projects can be found in the projects repository:

git clone git://github.com/RIOT-OS/projects.git

Switch from read-only to read-writable repository

Edit the file @.git/config@ within your local repository and replace

    url = git://github.com/RIOT-OS/RIOT.git

by

   url = git@github.com:RIOT-OS/RIOT.git

How to track a branch

Example for the stable branch:

git branch --track stable origin/stable

How to create a release

  • (Examples are for release 0.01a)

Tag it using git tag:

  git tag -s 0.01a

Export the tag:

  git archive --format=tar --prefix=riot-0.01a/ 0.01a | gzip > riot-0.01a.tar.gz

colored diff

To have a colored output for all git projects execute:

git config --global color.ui auto

If you only want a colored output for your current git project, then omit the --global attribute.

This also shows whitespace errors in red.

Clone this wiki locally