Add configuration for git
- Add .config/git/config + Define aliases + Configure default behavior in various situations + Add user information with signing key - Add .config/git/commit_msg_template.txt - Add .config/git/ignore - Integrate `git` aliases into the shell
This commit is contained in:
parent
3017a7bdec
commit
721c2fd905
21 changed files with 1122 additions and 66 deletions
23
.local/bin/git-prune-delete
Executable file
23
.local/bin/git-prune-delete
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Delete the local branches whose upstream branch was deleted on the remote
|
||||
#
|
||||
# `git branch --delete` without "--force" is used,
|
||||
# so branches holding unmerged commits are kept
|
||||
#
|
||||
# Usage: git prune-delete
|
||||
|
||||
set -eu
|
||||
|
||||
|
||||
_branches=$(git prune-show)
|
||||
|
||||
|
||||
if [ -z "$_branches" ]; then
|
||||
echo "No branches to prune"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# shellcheck disable=SC2086 # because branch names never contain whitespace
|
||||
git branch --delete $_branches
|
||||
Loading…
Reference in a new issue