Command Center

A personal cheat sheet for terminal commands, aliases, and useful scripts.

Git

Git Log One Line

View a concise, graphical representation of the commit history.

glo glog
git log --oneline --graph --decorate --all

Git Status

Show the working tree status.

gs gst
git status

Terminal

List Files

List all files and directories including hidden ones.

ll
ls -la

Common aliases

Navigating directories

Navigate through various levels of directories.

alias ...='cd ../..' alias ....='cd ../../..' alias .....='cd ../../../..' alias ......='cd ../../../../..' alias .......='cd ../../../../../..'

Manage Directories

Shortcuts for creating and removing directories.

md rd
alias md='mkdir' alias rd='rmdir'

Shell hacks

Hash

The shell maintains a hash table of recently executed commands to avoid searching the `PATH` every time. Use `hash` to view the table, or `hash -r` to clear it if you've moved an executable. This can be used as shortcuts to common folders allowing you to navigate to them more easily with `cd projects` or `cd github`.

hash -d github=~/Development/github hash -d projects=~/Development/projects