Art Of Eclipse

« Home » « About » « Github »

git log and show commits and export theme.

Every wonder how to get a nice formatted log in git here is how to do it with –since and –pretty options :

git log --since='last month' --pretty=format:'%h,%an,%ar,%s'

the above example display the hash of you commit, the author name, commit time “ago format”, and the commit message.

svn merge and rolling back your changes.

To revert the changes you make to a project/files and reset the changes to a specific revision all what you have to do is the following :

svn merge -rHEAD:oldrev filename
svn commit -m "rolled back to oldrev"

Add directory to system path in linux

Adding a directory to system path variable is easy in linux, just you have to append the directory to the system path
and you can do that by run the following command :

export PATH=/path/to/directory:$PATH

but this one is temporary for you current session, to make directory available in the system path, just edit you .bashrc file in you home folder, and add the above code at the end of the file:

$ vim ~/.bashrc

export PATH=/path/to/directory:$PATH

VBox : unable to find the sources of your current linux kernel ubuntu

after some update for my ubuntu linux, I wasn’t able to make my VBox machines to work, so i tried to run

sudo /etc/init.d/vboxdrv setup

but no use, but after some googling i found this and it’s solved my proble

sudo apt-get install dkms
sudo apt-get install linux-headers-`uname -r|cut -d'-' -f3`-`uname -r|cut -d'-' -f4`

referance : http://www.khattam.info/solved-error-unable-to-find-the-sources-of-your-current-linux-kernel-specify-kern_dir-and-run-make-again-stop-2010-11-26.html