The setup.bash tasks:
- Copy gitconfig to
~/.gitconfig. - Set local git user for this repo.
export DOTFILES=~/.dotfiles
bash ${DOTFILES}/git/setup.bashThen, update the signingkey in the new gitconfig file:
# List available signing keys
# And copy the "bbb" part off the "sec aaa/bbb" section
gpg --list-secret-keys --keyid-format=long
subl ~/.gitconfigSee the Reference File.
# create key with 4096 bits
gpg --full-generate-key
# list key to copy the ID after rsa4096/
gpg --list-secret-keys --keyid-format=long
# use the ID to configure .gitconfig
# Print GPG key and add to GitHub
gpg --armor --export ID-HERE#!/bin/sh
input=$1
# if message already has issue number - ignore it
while IFS= read -r line
do
res="$(echo "$line" |grep "Issue: CB-#")"
[ ! -z "$res" ] && exit;
done < "$input"
issueName=$(git symbolic-ref -q HEAD | tr '_' ' ' | awk '{print $2}')
echo " \n\nIssue: CB-#$issueName" >> "$input"