Skip to content

Commit bd33b03

Browse files
author
Thomas G.
committed
feat: ✨ revamp aliases
1 parent 16bc137 commit bd33b03

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

src/gitutils/alias.json

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
{
2+
"abort": "git rebase --abort",
3+
"aliases": "git config --get-regexp '^alias\\.' | awk '{printf \"%-20s = \",$1; for(i=2;i<=NF;++i) printf \"%s%s\", $i, (i<NF?OFS:ORS)}'",
24
"amend": "git diff-index --cached --quiet HEAD || git commit --amend -C HEAD",
3-
"beta": "git release-beta",
45
"cleanup": "git stash save --include-untracked --keep-index; git clean --force -d -x -e \".env*\"; git stash apply --index; git stash drop",
56
"co": "git commit -m \"$1\"",
67
"conflict": "git diff --name-only --diff-filter=U",
78
"continue": "git checkout -- . && git rebase --continue",
8-
"crush": "git stash save --keep-index --include-untracked && git reset --hard $(git rev-parse --abbrev-ref --symbolic-full-name @{u})",
99
"editLast": "git commit --amend --edit",
10+
"fbeta": "git release-beta",
11+
"ffeat": "git flow start feature $1",
12+
"fhotf": "git release-hotfix",
1013
"fixable": "git log --oneline $(git rev-parse --abbrev-ref --symbolic-full-name @{u})..HEAD",
1114
"fixAuthor": "git config \"${1---global}\" user.name \"$(git log -2 --pretty=format:'%an' | tail -1)\" && git config \"${1---global}\" user.email \"$(git log -2 --pretty=format:'%ae' | tail -1)\"",
12-
"fixConfig": "git config --global --get-regexp '^alias.' | grep '/tmp' | cut -d ' ' -f1 | while read -r alias; do git config --global --unset \"$alias\"; done",
15+
"fixConfig": "rm -f ~/.gitconfig",
1316
"fixMode": "git diff -p -R --no-color | grep -E \"^(diff|(old|new) mode)\" --color=never | git apply --allow-empty --no-index",
1417
"forceable": "git log --oneline $(echo $(git rev-parse --abbrev-ref --symbolic-full-name @{u};git log --merges --first-parent -1 --pretty=%h)| tail -1)..HEAD $*",
18+
"fprod": "git release-prod",
19+
"ftag": "git tag -a $1 -m \"$1\" && git push origin $1",
1520
"go": "git commit -m \"$1\" --all",
16-
"hfix": "git release-hotfix",
1721
"histo": "git log --oneline $(git log --merges --first-parent -1 --pretty=%h) $*",
1822
"ignore": "grep -qxF \"$1\" .gitignore || echo \"$1\" >>.gitignore && git rm --cached \"$1\" 2>/dev/null",
1923
"initFrom": "git clone --origin template --branch master --depth 1 -- $1 $2 && cd $2 && git branch -m master template && git checkout -b master && git checkout -b develop",
@@ -22,11 +26,9 @@
2226
"isFixup": "git log -1 --pretty=%s | grep -q fixup! && exit 0 || exit 1",
2327
"isRebase": "git rev-parse --git-dir | grep -q rebase-merge || git rev-parse --git-dir | grep -q rebase-apply",
2428
"pf": "git push --force-with-lease",
25-
"prod": "git release-prod",
26-
"rAbort": "git rebase --abort",
27-
"rCont": "git rebase --continue",
29+
"refresh": "git stash save --keep-index --include-untracked && git reset --hard $(git rev-parse --abbrev-ref --symbolic-full-name @{u})",
2830
"renameTag": "set -e;git tag $2 $1; git tag -d $1;git push origin :refs/tags/$1;git push --tags",
29-
"stack": "git commit --amend --no-edit --no-verify -C HEAD",
31+
"stack": "git diff-index --cached --quiet HEAD || git commit --amend --no-edit --no-verify -C HEAD",
3032
"sync": "git fetch --progress --prune --recurse-submodules=no origin && git stash save --keep-index --include-untracked && git merge --ff-only @{u} && git stash pop --index || git stash drop",
3133
"undo": "git reset --soft HEAD^ --"
3234
}

src/gitutils/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "gitutils",
33
"name": "Git Aliases",
44
"description": "A feature to add useful Git aliases to your shell.",
5-
"version": "5.12.3",
5+
"version": "5.13.0",
66
"dependsOn": {
77
"ghcr.io/devcontainers/features/node:1": "lts",
88
"ghcr.io/tomgrv/devcontainer-features/common-utils:3": {

0 commit comments

Comments
 (0)