# enable repo wide commit signing
git config commit.gpgsign true

# set global signing key
git config --global user.signingkey CAFEBABE

# create new branch, take local changes along
git checkout -b new-branch

# remove local branch
git branch -d new-branch

# add single hunk from a file
git add -p

# push the current branch
git push origin HEAD

# create alias "git new" to init with empty commit
git config --global alias.new '!git init && git commit --allow-empty -m "initial commit"'

# update all submodules
git submodule foreach git pull origin master

# create and apply patches
git format-patch -1 <commit-sha>
git am <patch-file>