My favorite bash aliases and personal CLI config files
Dotfiles (like ~/.vimrc, ~/.bashrc, etc. in your home directory) manage the configurations, themes, and settings that you customize within your command line environment. Storing them in a GitHub repository ensures all your favorite configurations are safe and sound in a central place. If you ever want to revert back to a previous configuration, your hard drive gets damaged, or you want to replicate and sync your environment on another machine, you can do so with just a few simple steps.
killport
for managing port processes. See my blog post for more details on this.gml
prints a pretty one-line format of git log
filtered to only my commits$ gml
* f074c20 2021-07-07 | Update `README` image links (HEAD -> main, origin/main) [Matt Heindel]
* 2d32e40 2021-07-05 | Add alias functions for managing server ports [Matt Heindel]
* ac0df26 2021-07-04 | Add welcome message that displays suggested files on opening bash [Matt Heindel]
* f728b13 2021-07-04 | New alias `cl` combines `cd` and `ls` commands [Matt Heindel]
* 9462a79 2021-07-04 | Modify alias `l` to sort files by most recent modification [Matt Heindel]
If you’d like to track your dotfiles, check out this helpful blog post for a full guide.
When adding the configuration files here to a new machine, enter the following commands into bash.
cd ~
git clone https://github.com/matt-heindel/dotfiles.git
cd ~/dotfiles
chmod +x makesymlinks.sh
./makesymlinks.sh
Any time you change a tracked dotfile, make sure to:
git push
from the machine with updatesgit pull
to any other machines you work onWhen tracking a new file or removing a file from tracking, a few extra step are required.
Open the makesymlinks.sh
file in vim
vim ~/dotfiles/makesymlinks.sh
Scroll to the Variables section and update the line files="..."
to be a space separated list of all dotfiles in the specified directory
########## Variables
dir=~/dotfiles # dotfiles directory
olddir=~/dotfiles_old # old dotfiles backup directory
# update files to match dir
files="bashrc vimrc bash_profile bash_aliases gitconfig" # list of files/folders to symlink in homedir
##########
Remember in vim pressing i
enters insert mode
Esc
then :wq
git commit
with a descriptive message of changesgit push