zypper se -d <searchstring> extended search -d tells to also search for the search string in descriptions

zypper se -r <repo> shows all packages in

zypper in --from <repo> <pacakge> installs from

zypper lu lists updates available

Read More


git log -p <#of-commits> => prints verbosely(code-diff)

git log --graph ascii graph of branches

git log --stat [++–]

git log --since=2.weeks time

git log --author (or –commiter for commiter)

git commit --amend to revert the latest commit

git commit -m 'initial commit'
git add forgotten_file
git commit --amend

will discard the latest commit add a new file to the commit and recommit with the added file

git reset HEAD <FILE> to unstage file

git reset HEAD~<#> goes # commits back.

git rebase -i HEAD~<#> allows you to change commit messages of # numbers of commits interactively

git checkout -- <file> to revert the changes and restore origin (e.g. version after clone)

git remote add <shortname> <url> adds remote repository

git remote -v displays all remote repos with urls

git fetch <remote branch (or shortname)> get changes from remote

git fetch origin gets news from origin==remote tree

git remote show origin check tracked branches

git remote rename <odl> <new> change name

git remote rm paul del remote

git brach <branchname> only creates branch but does not switch to it HEAD still points on master

git checkout <branchname> switch to newly created branch HEAD now points on

git checkout -b '<branchname>' short for branch => checkout

git merge <branchname> will result in a merge-commit it it has more than 1 ancestor, which creates a seperate(new) commit

if mergeconflict occures change files to resolve the diff and git add to stage the changes git commit finishes the merge

git branch --merged (--no-merged) will display the respective status of the branch

git push <remote> <branch> will upload to repository

git merge <remote>/<branch> to merge this branch with your current working tree

git checkout -b <branch> <remote>/<branch> will create a own branch with the changes for you to work on

** will be a Tracking-Branch (git pull will automatically get changes from remote (git push accordingly) --track for manual use) **

** git push <remote> :branchname CAUTION! this will delete the remote branch**


git checkout <branch_to_be_rebased>
git rebase <master>
git checkout <master>
git merge <branch_to_be_rebased>

go to the branch you wanted to rebase, rebase master to make your tree linear again, finally go to your master branch and merge the changes.

git rebase --onto master server client advanced stuff.. later plx

git clean -fd cleans working directory to be able to rebase

git stash -u stashes everything including -u(untracked files)

git stash list lists all available stashes

git pull --rebase <remote> <branch> rebase of local branch with remote/branch

git pull <remote> <branch> pulls changes from

git merge --no-commit --squash <branchname> no commmit, no merge-commit

git stash stashes uncommited changes

git stash drop <stash@<id>> drops from stashlist

git stash pop applys last stashed item and removes it from list

git stash apply applys last stashed item without removing it

git config --global alias.stash-unapply '!git stash show -p | git apply -R' cool feature for unapplying appied stashes

git config --global commit.template $HOME/.gitmessage.txt standard commit message


Read More

disk encryption (dm-crypt + LUKS, non-root)

encrypting external drives with dm-crypt and LUKS (hdd, flash etc.)

1) wipe potentially existing luks-header (optional)

dd if=/dev/zero of=/dev/sdX bs=512 count=20480

2) wipe existing partitions (optional)

3) setup luks-header

cryptsetup options luksFormat device


cryptsetup -v --cipher aes-xts-plain64 --key-size 512 \
--hash sha512 --iter-time 5000 --use-random luksFormat <device>

4) mount encrypted partition

simply mount


cryptsetup open <device> <name>

5) create file system

mkfs.fstype /dev/mapper/name

6) change user permissions (only accessible for root as default)

chown user:group <mount point>




Read More