Provided by: elektra-doc_0.8.14-5_all 

NAME
doc_GIT_md - INTRODUCTION
BASIC GIT COMMANDS
git add .
git commit -a
BASIC Configuration
make sure to do:
git config --global merge.ff false
git config merge.ff false
Remote Branches
To list all remote branches use:
git-branch -a
To checkout a remote branch initially use:
git-checkout -b <branchname> origin/<branchname>
Once you have done this, it will be a local branch, too. Following remote branches should exist:
master
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)
debian
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)
Local branches
You should always make your own feature branch with:
git-checkout -b <feature-branch-name>
On this branch it is not so important that every commit compiles or all test cases run.
To merge a branch use (no-fastforward):
git-merge --no-ff <branchname>
If you already did some commits, but want them in a branch, you can do:
git-branch foo
git reset HEAD^^ (for 2 commits back)
git reset origin/master
git-ref-log # recover
Github
When doing merge requests our buildserver will build authorized users. If you are not yet authorized
following question will be asked (by user markus2330):
Can one of the admins verify if this patch should be build?
Then one of the admins:
• fberlakovich
• manuelm
• markus2330
• beku need to confirm by saying: .*add+to+whitelist.* or if just the pull request should be checked:
.*build+allow.* or if just a single build of the mergerequest should be started: jenkins build please
or if the bindings job should be started: jenkins build bindings please
If you want any configuration changes, please contact Markus Raab elektra@markus-raab.org KDB itself.
Additionally, we added two other scripts, elektra-mount and elektra-umount which act as simple wrappers
for kdb mount and kdb umount. That work identically but are more script friendly.
The Full Command
The full command to use elektra-merge to perform a three-way merge on a file managed by ucf is: ucf
--three-way --threeway-merge-command elektra-merge <New file>=''> <Destination>
Thats it! As described above, elektra-merge is smart enough to run the whole merge off of the information
from that command and utilizes the new kdb remount command to do so.
How-To Integrate
Integrating elektra-merge into a package that already uses ucf is very easy! In postinst you should have
a line similar to: ucf <New file>=''> <Destination>
or perhaps: ucf --three-way <New file>=''> <Destination>
All you must do is in postinst, when run with the configure option you must mount the config file to
Elektra: kdb elektra-mount <New file>=''> <Mouting destination>=''> <Backend>
Next, you must update the line containing ucf with the options --three-way and --threeway-merge-command
like so: ucf --three-way --threeway-merge-command elektra-merge <New file>=''> <Destination>
Then, in your postrm script, during a purge, you must umount the config file before deleting it: kdb
elektra-umount <name>
That's it! With those small changes you can use Elektra to perform automatic three-way merges on any
files that your package uses ucf to handle!
Example
Below is a diff representing the changes we made to the samba-common package in order to allow automatic
configuration merging for smb.conf using Elektra. We chose this package because it already uses ucf to
handle smb.conf but it frequently requires users to manually merge changes across versions. Here is the
patch showing what we changed:
diff samba_orig/samba-3.6.6/debian/samba-common.postinst samba/samba-3.6.6/debian/samba-common.postinst
92c92,93
< ucf --three-way --debconf-ok "$NEWFILE" "$CONFIG"
---
> kdb elektra-mount "$CONFIG" system/samba/smb ini
> ucf --three-way --threeway-merge-command elektra-merge --debconf-ok "$NEWFILE" "$CONFIG"
Only in samba/samba-3.6.6/debian/: samba-common.postinst~
diff samba_orig/samba-3.6.6/debian/samba-common.postrm samba/samba-3.6.6/debian/samba-common.postrm
4a5
> kdb elektra-umount system/samba/smb
As you can see, all we had to do was add the line to mount smb.conf during install, update the ucf
command to include the new --threeway-merge-command option, and unmount system/samba/smb during a purge.
It really is that easy!
Version 0.8.14 Tue Dec 15 2015 doc_GIT_md(3elektra)