List of notes tagged tricks

Undo last commit in git

When you make a commit to a wrong branch and you need to undo it.

Get script directory or file name

Get the filename and directory path of a Python script in the file system using the __file__ variable and the os module.

© 2023 hack nota