10. February 2012
Please find new posts to this blog here:
There will be no more posts here
10. February 2012
Please find new posts to this blog here:
There will be no more posts here
6. February 2012
git diff fw7e7f8wef8wef yourfile.c
Gives the changes between current working dir and revision or branch: fw7e7f8wef8wef
31. January 2012
Simply use git tag as usual but provide a valid commit hash:
git tag -a v1.0 cc622186a7322713f0ee4df8d58a1adcfe2ffef6 -m”tag a particular commit”
22. December 2011
The portability of programs between *nix und Windows is often limited not by the program itself but by certain helper tools. One of those is getopt which provides a fast and easy way to read in command line arguments.
Please find a windows version here: http://suacommunity.com/dictionary/getopt-entry.php
You will find more other useful ports here as well.
16. December 2011
You can easily have a look at a tag with
git show mytag
Much more powerfull and showing you all sorts of realations between tags and commits is git describe:
25. November 2011
Go to Settings > Keyboard > Shortcuts and add three shortcuts for your function keys. The commands should be:
amixer set Master 5%+
amixer set Master 5%-
amixer set Master toggle
This requires that the function keys are actually recognized by your system but have no command assigned till now
10. November 2011
In general the following should work:
VBoxManage modifyhd MYHD.vdi –resize 20000
Were 20000 is more or less 20 GB.
If the command fails several reasons could be the cause.
VBoxManage showhdinfo MYHD.vdi
If the result is not:
Format variant: dynamic default
you have to migrate your disk to that dynamic system. Since this is the default container for newer versions you can simply clone your HD file and then enlarge the new one:
VBoxManage clonehd MYHD.vdi MYNEWHD.vdi
12. July 2011
git fetch –> updates your local rep but not your working Dir
git diff … origin gives you the comparison
11. July 2011
If you have files or directories under git control and change the rights of them, git does recognize them as changed.
To force git to ignore these changes just execute the following.
git config core.filemode false
You can reenable that after all files have a new revision because of an actual change and are comitted in the new mode anyway.
28. June 2011
If you set the likwid install path in config.mk and the last character is a slash, likwid-pin will not run with the following error message:
ERROR: ld.so: object ‘~/helper/likwid-2.2-inst’ from LD_PRELOAD cannot be preloaded: ignored.
Delete the last slash and do
make clean && make && make install
and likwid-pin should work fine.
27. June 2011
git clone email@example.com:projectname newdir -b yourbranchname
14. June 2011
To show the tags you made and the comments or tag messages:
git tag -l -n1
7. April 2011
Each and every editor handles whitespaces tabs etc. differently. The first step to get everyting out to the open is so show whitespaces and tabs the way the editor sees them. For me it’s emacs and the following lines in your ~/.emacs should give you a good view of whitespaces.
Look at this documentation for all references
Please be patient and drop me a comment if there are any errors or misunderstandings. I’m really no emacs pro!!!
16. March 2011
You created some local repository and worked on that for a while. Now you want to have it on a server so that others can collaborate.
We want to keep the full history so we want to push the current repository to the server. In order to do this at least for the master branch you have to edit the config file at:
It probably looks like the following:
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
The easiest way to get everything right is to check out the empty repository from the server via
git clone and diff the two config files.
Finally you see that you have to add something like:
fetch = +refs/heads/*:refs/remotes/origin/*
url = firstname.lastname@example.org:MyNewProject
remote = origin
merge = refs/heads/master
To the existing config.
Now issue a git push origin master and the master will be pushed.
If you know whether that works with branches as well or how to get that working, please drop me a comment!?
There are other ways to just give the repository as a argument at the
git push command but I like to keep my old directories.
26. January 2011
You branched out for development and now it is time to get the improvements back to the master branch.
This is achieve by
git merge while on the master branch.
To be sure to not mess up anything, I prefer to clone my repository first and do the merge there.
So best is if you commit all changes in master and dev branch. Do a couple of pushs and pulls so everything is in sync and then clone your repository to a new location.
You can directly clone the branch you want to merge then proceed to 2. otherwise do a
git checkout branchname
git checkout master
git merge branchname
You have to resolve any conflicts in any files by removing the spiky brackets in the file and of course take a close look what caused the conflict and fix it.
Then add the file via
git add and commit it via
git commit .
Do this for every file.
20. January 2011
If you want to update your CVS working copy to get new directories from the server, a simple
cvs up does not get these directories.
cvs up -d
14. January 2011
Till now all my posts concerned repositories already created. But how to create your own git rep in the first place?
and the new-rep-dir is a git repository
Hint by TZ:
git init is the alias for
23. December 2010
You have several development branches but basically use the same files to test or benchmark all versions. Then there is no sense in developing different code in all these branches for the same purpose.
You can easily merge single files from one branch to the other by cherry-pick.
1. First commit a file and only the file you want to share, nothing else:
git commit bench.sh -m"Newest fancy script which does all tests for all versions"
2. Save the
3. Go to the other branch folder or checkout the other branch in the same folder, as you like.
4. git cherry-pick
You should now have the same file in the other branch as well.
Thanks to Markus for pointing me towards this.
22. December 2010
Tags are nothing else then names for certain revision.
So called annotated tags store the status of the project at a specific point in time for future use.
Create a tag:
git tag -a v1.0 -m"Your comment for version 1.0"
Push tag to repository:
git push --tags
15. December 2010
To create a branch for some development work in git is really easy.
First clone an existing repository like described here.
In the new directory simple execute: git branch newbranch.
However, if you execute git status you will see that you are still on the master branch or the other branch you worked before (then the question is how did you get there
Execute git checkout newbranch an d git status will show you that you are now working on branch .
In order to push this information to another repository or a git server, git push per se will not do the trick. First you need to execute git push origin newbranch and now your branch is committed to the other repository.
6. November 2010
How to embed fonts in pdf files which are generated from latex and eps source under linux is nicely described here:
Be sure to disable the field “use device fonts” in the xmgrace printer settings when printing to eps
5. November 2010
Distributed Revision Systems have the advantage that a central server is not necessary in contrast to CVS or SVN. Furthermore commits and even more important diffs to other versions can be made with a local repository only. This is an adanvantage when working offline, e.g. on journeys, on a plane etc. Furthermore a new branch for testing can quickly be made by simply cloning the repository once more and work in the new directory.
To setup up git client on your ubuntu linux just type aptitude install git-core and you’re done.
For windows you need to download 2 packages:
If you install in this order everything should be fine. If Tortoise later on complains about not finding git, you get to Tortoise’ Settings and point the git path to the directory where you installed msysgit +\bin e.g. c:\Program Files\git\bin
Working together on a project can be done like CVS and SVN. But in contrast to these central methods, you do not commit your files to the central repository but first to your local rep.
The central repository is then updated by a so called push.
To get the updates from the central server you do a pull.
Basic tasks are:
This is just for starting with git, please consult the manuals and documentation on more advanced topics.
Thanks to Thomas for this information for a quick start.
Another Distributed Revision System is mercurial where you find a small tutorial here: MercurialHG
20. May 2010
The recent upgrade to the new ubuntu stable version missed installing all tex-live ressources, I thought at first.
However license of floatflt.sty has been changed, thus it is no longer in ubuntu or tex-live.
Here’s a quick guide to reenable it.
LaTeX Error: File `floatflt.sty’ not found
sudo mkdir -p /usr/share/texmf-texlive/tex/latex/floatflt
sudo rm -f floatflt.* float*.tex
sudo wget http://mirror.ctan.org/macros/latex/contrib/floatflt/floatflt.ins
sudo wget http://mirror.ctan.org/macros/latex/contrib/floatflt/floatflt.dtx
sudo latex floatflt.ins
sudo texhash /usr/share/texmf-texlive
I would appreciate any hint to any solution which does this more automatically please drop me a comment on your solution.
6. July 2009
Again and again I felt the urge to have a real tool organize my literature instead of crawling inside bibtex files with every new paper or report again.
So recently I heard something about SCOPUS from the publisher ELSEVIER, Citavi is free for members of our University but all lack some features.
The largest problem however is, how to import bibliographys from webpages and similar “free form” sources.
Finally I stumbled across the Firefox extension Zotero.
Once installed its active in the background and is only visible by clicking its logo in the lower window bar. If you now visit a site which has bibliography similar input, a small icon appears in the address bar which exhibits all literature found on this page. With a selection and by hitting ok, you now import one or more books, articles aso. Into the Zotero DB. Furthermore you can search in the DB by tags and other fields. Can organize categories and subcategories and output to RTF aso. and of course bibtex files.
You can as well import bibtex files to appreciate your hard work generating these files by hand in the past :-).
Zotero is of course not free from flaws and some webpages, even that ones which Zotero has optimized parsers for, provide information with errors till the next parser release comes out.
I’ve not figured out how to efficiently use this on multiple Computers at the same time, but I’m sure there is a solution as well.
21. October 2008
To get hand on knowledge on the distributed revision systems like Mercurial,
just export one of your CVS Reps to a test HG Rep. Important for any repository, the history should stay intact (and hopefully will)!
A more complete guide can be found here:
Generate the repository folder and enter:
mkdir -p /path/to/hg/repo
Generate the config file:
tailor -v –source-kind cvs –target-kind hg –repository /path/to/CVS/REP –module YourModuleName -r INITIAL >Config.tailor
for SSH access to the repository change /path/to/CVS/REP to :
Change configfile to your needs
Now you will at least need to change subdir from . to MODULENAME, and remove /MODULENAME from root-directory in the MODULENAME.tailor file (if it is really there).
Add the line:
Generate Mercurial project
tailor –configfile MODULENAME.tailor
To clone the repository, ssh can be used easily.
Just type the following hg clone ssh://yourlogin@yourhost/
or insert ssh://yourlogin@yourhost// in your client program as the source path.