Skip to content
Volf Tomáš edited this page Mar 10, 2015 · 1 revision

Useful information for developers

GIT

Basic commands

GIT is required, including ssh keys

git config --global user.name "Jara da Cimmrman"
git config --global user.email "jara@email.cz"
git init

git clone git@github.com:fit-uifs/vtapi.git
git status

git add ./myfile.cpp
git rm -r build/*
git commit -a
git push                [origin [master]]
git pull

More on devdaily.com or in GitHub cheatsheet

Note that git will not ignore a file that was already tracked before a rule was added to .git/info/exclude (.gitignore) file...

git rm --cached myfile.cpp

Apply executed commit also into another branch

How to apply changes of a specific commit from one branch to another branch (assume, that git commit was applied to the master branch):

git checkout v1.5
git cherry-pick <sha1>

The first command changes the local copy to branch v1.5. In the second command, <sha1> is the hash identifier of the specific commit (master branch), whose changes are to be applied to the v1.5 branch too.

Change your local repository to another remote (ie. gitorious.org -> github.com)

To migrate your local repository to remote github repository (from gitorious) please use:

git remote set-url origin git@github.com:fit-uifs/vtapi.git 

for access via SSH or

git remote set-url origin https://github.com/fit-uifs/vtapi.git 

for access via HTTPS.

Coding

Be careful: libpqtypes and libpq respectively, do not use malloc/free, but new/delete instead.

Notes:

Gengetopt - config file & arguments parser

apt-get install gengetopt
gengetopt < vtapi.ggo

Autotools - building C/C++ libraries

For developers only: You can edit configure.ac, Makefile.am, src/Makefile.am, include/Makefile.am, doc/Makefile.am and run autogen.sh then to build ./configure