Skip to content

Instantly share code, notes, and snippets.

@waimus
Last active July 31, 2021 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save waimus/3b383a5bf6c6e9cfa8ebb6c9c5e24133 to your computer and use it in GitHub Desktop.
Save waimus/3b383a5bf6c6e9cfa8ebb6c9c5e24133 to your computer and use it in GitHub Desktop.
Fake commit. Wether you want to commit crime, war crime, or what is this example is doing.
#!/usr/bin/env bash
# Fake git commit message
# ------------- customize info here -------------
# Colours
RESET="\033[0m"
C1="\033[0;94m" # intense blue
C2="\033[0;34m" # blue
C3="\033[0;92m" # green
# Fake details for identity theft which is not a joke, Jim.
# Millions of families suffer every year
usr="${USER}"
host="sucklife"
wd="~/Bathroom"
prompt="$C1[$C2$usr@$host $C3$wd$C1]$RESET$"
# Git details
commitmsg="suicide"
branchfrom="life"
branchto="death" # If not needed, leave blank
branch="$branchfrom:$branchto"
url="https://github.com/suckasslife/life.git"
# If $branchto is empty, we're just working in $branchfrom
if [[ -z "$branchto" ]]; then
branch="$branchfrom"
fi
# ------------- start committing $commitmsg -------------
# commit stuff
echo -e "$prompt git commit -m \"$commitmsg\""
# commit info
echo "[life dc6af77] $commitmsg"
echo " 1 file changed, 2 insertions(+), 173 deletions(-)"
# push
echo -e "$prompt git push origin $branch"
# push info
echo "Enumerating objects: 84, done."
echo "Counting objects: 100% (84.84), done."
echo "Delta compression using up to 4 threads"
echo "Compressing objects: 100% (82/82), done."
echo "Writing objects: 100%, 1.85 MiB | 2941.00 KiB/s, done."
echo "Total 82 (delta 18), reused 3 (delta 0), pack-reused 0"
echo "remote: Resolving deltas: 100% (18/18), completed with 2 local objects."
echo "To $url"
msg=" 09b3707..dc6af77 $branchfrom -> $branchto"
if [[ -z "$branchto" ]]; then
msg=" 09b3707..dc6af77 $branchfrom -> $branchfrom"
fi
echo "$msg"
#
read -p "$(echo -e $prompt) " IN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment