Undo last commit (without discarding new files)

git reset --soft HEAD~1

Setting up Git for commits

git config --global ""
git config --global "John S. Smith"

Storing Login Details in RAM cache

Doesn't seem to be working for me atm, need to do more research

git config --global credential.credentialStore cache

This stores the credentials in a plaintext file in ~/.git-credentials

git config --global credential.helper store

Signing git commits and getting verified commits on github

GPG-Keys > Generate Primary GPG Key

Download latest released binary of a repo

Getting latest deb file and sha of neovim:

URL=$(wget -O - | awk -F \" -v RS="," '/browser_download_url/ {print $(NF-1)}'| sed '/.deb/!d'); wget $URL

Gets latest and last binary file in Assets (recommend using sed to filter the extension like above)

URL=$(wget<USER>/<REPO>/releases/latest -O - | awk -F \" -v RS="," '/browser_download_url/ {print $(NF-1)}'); wget $URL -O $(basename "$URL")

Git clone one specific folder

Copied from:

git clone --no-checkout
cd git
git sparse-checkout init --cone
# that sets git config core.sparseCheckoutCone true
git sparse-checkout set folder1/folder2
git read-tree -mu HEAD

Git move changed uncommitted work to a new branch

git checkout -b <new-branch>