diff --git a/20170306_stammtisch.md b/20170306_stammtisch.md index 3396d70006d301b9890833d571aa291790046850..97ea46e1c30801dce101433d7d18fdaf8478a23c 100644 --- a/20170306_stammtisch.md +++ b/20170306_stammtisch.md @@ -19,44 +19,50 @@ - tmux and vim, have a look at https://git.idiv.de/scientific-computing/RStudio-Docu/blob/master/tmux.md - search for tmux, vim and python PEP8 - use ! to execute commands from inside vim on the command line, e.g. the following will run wc on the current file - {{{ - :! wc % - }}} + + ``` + :! wc % + ``` - search for dotfiles ## Maria, ask git when a line of code did change -git will tell you in which commit a file changed -{{ -git log dotfile.yml -}}} +- git will tell you in which commit a file changed + + ``` + git log dotfile.yml + ``` +- git will tell you when the line range in a file changed + ``` + git log -L 10,12:dotfile.yml + ``` -git will tell you when the line range in a file changed -{{{ -git log -L 10,12:dotfile.yml -}}} +- git will tell you when a function in a file changed -git will tell you when a function in a file changed -{{{ -git log -L :is_workday:analysis.r -}}} + ``` + git log -L :is_workday:analysis.r + ``` ## Maria how to check out individual file (with a new name) -{{{ -git checkout 14134e6 muhkuh -}}} +- tell git to checkout file from commit (overwrites current version) + ``` + git checkout 14134e6 muhkuh + ``` -or to a new file (mind the :) -{{{ -git checkout 14134e6:muhkuh > newkuh -}}} +- or checkout to a new file (mind the :) + + ``` + git checkout 14134e6:muhkuh > newkuh + ``` ## Christian how to add users to a group in Linux -{{{ -usermod -a -G groupName userName -}}} +- append a group to the groups a user is member of + + ``` + usermod -a -G groupName userName + ``` ## Christian file directory structure in Linux -Why do you need a /? +Why do you need a `/`? - Everything starts at / (say root). - Your user usually has a home directory like /home/username