Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.

Todays questions:

  • Florian VIM as Python IDE
  • Maria when did a line of code change (yeah actual git question)
  • Maria how to check out individual file (with a new name)
  • Christian how to add users to a group in Linux
  • Christian file directory structure in Linux
  • Maria optparse in R debugging

organisational

answers

Florian, VIM as Python IDE

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 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 log -L :is_workday:analysis.r

Maria how to check out individual file (with a new name)

  • tell git to checkout file from commit (overwrites current version)

    git checkout 14134e6 muhkuh
  • or checkout to a new file (mind the :)

    git checkout  14134e6:muhkuh > newkuh

Christian how to add users to a group in Linux

  • 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 /?

Maria, optparse in R debugging

  • time run out, feel free to add pointers/solution here

    ?optparse
    vignette("optparse")