moving home-manager stuff to one sharable file
This commit is contained in:
1 parent
c1d43499cb
commit
618429e3c0
10 files changed
+212
-104
No files matched your search
@@ -0,0 +1,32 @@
|
||||
[alias]
|
||||
pp = "!f() { \
|
||||
echo 'git pull --ff';\
|
||||
git pull --ff; \
|
||||
echo 'git push';\
|
||||
git push; \
|
||||
}; f";
|
||||
up = "pull --rebase --autostash";
|
||||
ca = "commit -a";
|
||||
ls = "log --oneline";
|
||||
cap = "!f() { \
|
||||
echo 'commiting code'; \
|
||||
git ca ${@}; \
|
||||
echo 'pushing...'; \
|
||||
git push ; \
|
||||
}; f";
|
||||
undo-commit = "!f() { \
|
||||
lastcommit=$(git log --oneline -n 1); \
|
||||
echo '[[switching]] from' $lastcommit; \
|
||||
git reset --soft HEAD~${1:-1}; \
|
||||
lastcommit=$(git log --oneline -n 1); \
|
||||
echo '[[switching]] to' $lastcommit; \
|
||||
git status; \
|
||||
}; f";
|
||||
sync = "!f() { \
|
||||
target_branch=${1:-main}; \
|
||||
remote=${2:-origin}; \
|
||||
git fetch $remote $target_branch:$target_branch; \
|
||||
}; f";
|
||||
clean-branches = "!f() { \
|
||||
git for-each-ref --format '%(refname:short)' refs/heads| grep -v 'master\\|main' | xargs git branch -D ; \
|
||||
}; f";
|
||||
Reference in new issue
Block a user