GPIO : Git - D


Click here to browse the repositories. Mac hints.

Visit the Git Home Page, to download git.
Client Applications for Windows: msysGit, NetBeans, TortoiseGit.
Client Applications for Mac: The terminal is better than the GUI apps.

Unfortunately it's not possible to clone the repositories on this site without sending me a public key.
Instead, I've cloned the sources and packed them here:

MCU.tar.gz
MCU.tar.bz2
linker-scripts.tar.gz

You can still win a board; this contest will be closed as soon as I have emails from 10 people (or more).
So far, 1 winner is found. Make sure you're the next!

If you want read or read/write access to the repositories, please send an email to this domain name with the first dot replaced by @
-Remember to attach your public key and let me know your desired user name (eg. UNIX shortname).
Also let me know if you want read-only access or read/write (this can be changed later).
I'll then add you as soon as I'm able to.


A step-by-step guide on how to build a GDC+GCC toolchain for ARM Cortex-M microcontrollers can be downloaded as a PDF.
You can also download the build-script if you don't want to copy-and-paste from the PDF.
You'll probably need to set the permissions to 755, before you can run the script.
The build-script is named 'b', as I tend to use things like ...
alias b='./b'

Receive sources from server, use the repository name as project directory name:
~$ cd MySources
MySources$ git clone d.gpio.dk:BDash
Cloning into 'BDash'...
remote: Counting objects: 43, done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 43 (delta 17), reused 0 (delta 0)
Receiving objects: 100% (43/43), 105.56 KiB, done.
Resolving deltas: 100% (17/17), done.

Receive sources from server, but choose a new name for the project directory:
MySources$ git clone d.gpio.dk:BDash BoulderDash
Cloning into 'BoulderDash'...

Add your existing project to a repository:
~$ cd MySources/MyProject
MyProject$ git init
Initialized empty Git repository in /Users/bob/MySources/MyProject/.git/
MyProject$ git remote add origin d.gpio.dk:MyProject
MyProject$ git add *
MyProject$ git commit -a -m "initial sources"
MyProject$ git push --set-upstream origin master
Note: You (or the admin) must create the repository first!

Everyday use...

Before you start editing your sources, it might be a good idea to get the latest changes, to avoid conflicts:
~$ cd MySources/MyProject
MyProject$ git pull

When you've made some changes, and tested that there are no compile-errors (or the like), it's a good idea to submit these changes:
MyProject$ git commit -a -m "Fixed bug in calculating the distance between the two ships."
MyProject$ git push
Note: Commit + push often = easiest life, and the server also works as a backup or a big undo-buffer.



This is a very useful alias; it allows you to 'undo' a git add:
git config --global alias.unstage 'reset HEAD --'


If you want the tab width (aka tab-size) for diff to be 4 characters, you can use this:
git config --global core.pager 'less -x1,5'