Last active
July 2, 2020 14:23
-
-
Save mwilsoncoding/f385364ceab7b9f2224faafdb1dc2ccf to your computer and use it in GitHub Desktop.
Version Control Aliases in 2020
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Git only | |
alias gi='git init -q; fle=$(mktemp -p .); git add .; git commit -am init &>/dev/null; rm $fle; git branch -m main; git commit -am main &>/dev/null; unset $fle;' | |
# Pijul only | |
alias pi='pijul init; pijul fork main; pijul prune master;' | |
# Git and Pijul | |
alias gi='git init -q; ! [ -d ./.pijul ] || { echo ".pijul/" >>.gitignore; echo ".git/" >>.pijulignore; git add .; git commit -am ".gitignore and .pijulignore" &>/dev/null; pijul add --recursive .; pijul record -am ".gitignore and .pijulignore" &>/dev/null; }; fle=$(mktemp -p .); git add .; git commit -am init &>/dev/null; rm $fle; git branch -m main; git commit -am main &>/dev/null; unset $fle;' | |
alias pi='pijul init; pijul fork main; pijul prune master; ! [ -d ./.git ] || { echo ".pijul/" >>.gitignore; echo ".git/" >>.pijulignore; git add .; git commit -am ".gitignore and .pijulignore" &>/dev/null; pijul add --recursive .; pijul record -am ".gitignore and .pijulignore" &>/dev/null; };' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment