MacOS Install all software updates

Lists and install all pending software updates on MacOS using terminal.
softwareupdate -i -a

Git un commit last commit

Stages last commit files.
git reset --soft HEAD^

SSH download from linux remote to local

The -avzp flags are to be progressive, zipped, recursive.
rsync -avzp destination local

// example downloading file called .salam
rsync -avzP [email protected]:/home/ec2-user/.salam ./Desktop

Cleanup local git branches

Delete all git branches in local machine except "main" and "staging". More branches can be excluded with the regex pattern
git branch | egrep -v "(^\*|main|staging)" | xargs git branch -D