Wiki
2023-08-31
Git
Merge forked branch w/ upstream (on Codeberg)
git remote add upstream <url>.git
git fetch upstream
git pull upstream master
git push
Add forked branch to base repo
git remote add upstream <url>.git
git push upstream <forkedbranchname>:<basebranchname>
Delete commit from already pushed main/master branch (force-push)
git reset --hard HEAD~<number of commits>
git push --force
Pull changes from another branch, e.g. stable/dev
git checkout <branch>
git merge main
Fetch updated submodules
git submodule foreach git pull origin <branch>
Bash
My holy PS1 prompt
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]'
Some of my bash aliases
alias c='clear'
alias e='exit'
alias lc='luacheck ./ --no-max-line-length'
alias reload='source ~/.bashrc'
alias ls='ls -AFClh --color=always --hyperlink=always'
alias jek='bundle exec jekyll serve --livereload'
alias op='find . -type f -iname "*.png" -exec optipng -o7 -zm1-9 -nc -strip all -clobber {} \;'
Arch/boot/disks
Delete old boot options from BIOS boot menu
sudo efibootmgr # List all options
sudo efibootmgr --bootnum <num> --delete-bootnum # Delete boot option <num>