Reset Head (Destructive: undo last commit.)

git reset --hard HEAD      # (going back to HEAD)

git reset --hard HEAD^     # (going back to the commit before HEAD)
git reset --hard HEAD~1    # (equivalent to "^")

git reset --hard HEAD~2    # (going back two commits before HEAD)

Delete a remote tag

git push --delete origin <your_tag_name>

Deleting already merged branches

Clear local branches:

## Local git clear
git branch --merged | grep -v '\*\|master\|develop' | xargs -n 1 git branch -d

Clear remote branches:

git branch -r --merged | grep -v '\*\|master\|develop' | sed 's/origin\///' | xargs -n 1 git push --delete origin

Get a commit list since last tag

Good for making release notes / changelogs.

git log <yourlasttag>..HEAD --oneline


The fundamental purpose of an init system is to initialize the components that must be started after the Linux kernel is booted (traditionally known as “userland” components). The init system is also used to manage services and daemons for the server at any point while the system is running. With that in mind, we will start with some simple service management operations.

sudo systemctl start <app>  # start the service
sudo systemctl status <app> # check status of service
sudo systemctl list-units   # list of all of the active units that


In doom-emacs, add -- + the ripgrep flags to pass args:

# add search for a string of a specific file type
-- -g '*.h'