\subsection*{Basic G\+IT Commands}

\begin{DoxyVerb}    git add readme.md   // adds the changes of the file `readme.md` to the staging area
    git add .           // adds all changes of files in the current directory (recursively) to the staging area
    git add --all       // adds all changes of files in the repository to the staging area
    git commit -a       // executes a commit that automatically stages all changed and deleted files before
\end{DoxyVerb}


\subsection*{Basic Configuration}

make sure to do\+: \begin{DoxyVerb}    git config --global merge.ff false
    git config merge.ff false
\end{DoxyVerb}


\subsection*{The Commit Message}

A commit message should have the following syntax\+: {\ttfamily component\+: short change description}

For a clean and meaningful log the commit message should fulfil the following\+:


\begin{DoxyItemize}
\item use imperative in the subject line
\item the subject line should not be longer than 50 characters
\item start the subject line with the module name (e.\+g. resolver\+:, cpp bindings\+:)
\item separate subject from body with a blank line
\item in the body describe in detail what you did, and possibly why
\item metadata like \char`\"{}\+Fixes \#123\char`\"{} should be kept at the bottom of the commit message and definitely not in the title
\end{DoxyItemize}

Most commits should have a longer description in the body.

\subsection*{Remote Branches}

To list all remote branches use\+: \begin{DoxyVerb}    git branch -a
\end{DoxyVerb}


To checkout a remote branch initially use\+: \begin{DoxyVerb}    git checkout -b <branchname> origin/<branchname>
\end{DoxyVerb}


Once you have done this, it will be a local branch, too. Following remote branches should exist\+: \begin{DoxyVerb}    master
\end{DoxyVerb}


This is the development branch. Please try to not work directly on it, but instead you should use feature branches. So the only commits on master should be non-\/fastforward merges from features branches. Commits on master should always compile and all test cases should pass successfully. (see config option above) \begin{DoxyVerb}    debian
\end{DoxyVerb}


Is the branch to be used to build debian packages. It additionally contains the debian folder. Only debian related commits should be on the debian branch -\/ otherwise it should only contain --no-\/ff merges from master. (see config option above)

\subsection*{Local Branches}

You should always make your own feature branch with\+: \begin{DoxyVerb}    git checkout -b <feature-branch-name>
\end{DoxyVerb}


On this branch it is not so important that every commit compiles or all test cases run.

To merge a branch use (no-\/fastforward)\+: \begin{DoxyVerb}    git merge --no-ff <branchname>
\end{DoxyVerb}


If you already did some commits, but want them in a branch, you can do\+: \begin{DoxyVerb}    git branch foo
    git reset HEAD^^  (for 2 commits back)
    git reset origin/master

    git-ref-log # recover
\end{DoxyVerb}


\subsection*{Github}

When doing merge requests our \href{https://build.libelektra.org}{\tt buildserver} will build authorized users. If you are not yet authorized, the following question will be asked (by user markus2330)\+: \begin{DoxyVerb}    Can one of the admins verify if this patch should be build?
\end{DoxyVerb}


Then one of the admins\+:


\begin{DoxyItemize}
\item fberlakovich
\item manuelm
\item markus2330
\item beku
\end{DoxyItemize}

need to confirm by saying\+: \begin{DoxyVerb}    .*add\W+to\W+whitelist.*
\end{DoxyVerb}


or if just the pull request should be checked\+: \begin{DoxyVerb}    .*build\W+allow.*
\end{DoxyVerb}


or if just a single build of the mergerequest should be started\+: \begin{DoxyVerb}    jenkins build please
\end{DoxyVerb}


or if specific jobs should be started\+:


\begin{DoxyItemize}
\item jenkins build \href{https://build.libelektra.org/job/elektra-test-bindings/}{\tt bindings} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-clang/}{\tt clang} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-clang-asan/}{\tt clang-\/asan} please
\item jenkins build \href{https://build.libelektra.org/jenkins/job/elektra-doc/}{\tt doc} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-asan/}{\tt gcc-\/asan} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-mergerequests-fast/}{\tt fast} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc/}{\tt gcc} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian/}{\tt gcc-\/configure-\/debian} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-debug}{\tt gcc-\/configure-\/debian-\/debug} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-intree/}{\tt gcc-\/configure-\/debian-\/intree} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-log}{\tt gcc-\/configure-\/debian-\/log} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-musl/}{\tt gcc-\/configure-\/debian-\/musl} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-nokdbtest/}{\tt gcc-\/configure-\/debian-\/nokdbtest} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-notest/}{\tt gcc-\/configure-\/debian-\/notest} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-shared/}{\tt gcc-\/configure-\/debian-\/shared} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-stretch/}{\tt gcc-\/configure-\/debian-\/stretch} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-optimizations/}{\tt gcc-\/configure-\/debian-\/optimizations} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-wheezy/}{\tt gcc-\/configure-\/debian-\/wheezy} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-withspace/}{\tt gcc-\/configure-\/debian-\/withspace} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-xdg/}{\tt gcc-\/configure-\/xdg} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-i386/}{\tt gcc-\/i386} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc47-all/}{\tt gcc47-\/all} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-git-buildpackage-jessie/}{\tt git-\/buildpackage-\/jessie} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-git-buildpackage-wheezy/}{\tt git-\/buildpackage-\/wheezy} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-icc/}{\tt icc} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-ini-mergerequests/}{\tt ini} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-local-installation/}{\tt local-\/installation} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-mingw-w64/}{\tt mingw64} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-multiconfig-gcc-stable/}{\tt multiconfig-\/gcc-\/stable} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-multiconfig-gcc47-cmake-options/}{\tt multiconfig-\/gcc47-\/cmake-\/options} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-source-package-test/}{\tt source-\/package-\/test} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-mergerequests-stable/}{\tt stable} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-mergerequests-unstable/}{\tt unstable} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-homepage/}{\tt homepage} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-stretch-minimal/}{\tt gcc-\/configure-\/debian-\/stretch-\/minimal} please
\item jenkins build \href{https://build.libelektra.org/job/elektra-gcc-configure-debian-jessie-minimal/}{\tt gcc-\/configure-\/debian-\/jessie-\/minimal} please
\end{DoxyItemize}

If you want any configuration changes, please contact {\ttfamily Markus Raab $<$elektra@markus-\/raab.\+org$>$}.

\subsubsection*{Run All Tests}

Before we merge a pull request we want to make sure, that all of the build jobs mentioned above still work. For this purpose we provide the phrase\+:


\begin{DoxyCode}
jenkins build all please
\end{DoxyCode}


. If you add this phrase to a comment in your pull request, then Jenkins will run all jobs, except for


\begin{DoxyItemize}
\item {\ttfamily elektra-\/git-\/buildpackage-\/jessie},
\item {\ttfamily elektra-\/git-\/buildpackage-\/stretch}, and
\item {\ttfamily elektra-\/git-\/buildpackage-\/wheezy},
\end{DoxyItemize}

. Since running all test jobs takes a lot of time, please use this phrase only if


\begin{DoxyItemize}
\item all of the {\bfseries standard PR jobs} were already {\bfseries successful}, and
\item you are sure that you {\bfseries do not want change anything} in your PR anymore
\end{DoxyItemize}