mirror of
https://codeberg.org/vlw/dotfiles.git
synced 2025-09-13 19:03:40 +02:00
wip: 2025-06-06T08:31:44+0200 (1749191504)
This commit is contained in:
parent
9a91c12b6d
commit
9d8ae59e77
1 changed files with 14 additions and 7 deletions
|
@ -54,23 +54,30 @@ gitf () {
|
||||||
gitf w
|
gitf w
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Create a git "Work in Progress" commit with timestamps
|
|
||||||
"w")
|
|
||||||
git commit -m "wip: $(date +%Y-%m-%dT%H:%M:%S%z) ($(date +%s))"
|
|
||||||
;;
|
|
||||||
|
|
||||||
# Clear local branches that have no upstream on remote (cleanup)
|
# Clear local branches that have no upstream on remote (cleanup)
|
||||||
"c")
|
"c")
|
||||||
git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D
|
git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# Pull current branch from a remote (defaults to "origin")
|
# Pull current branch from a remote (defaults to "origin"). "d" for download.
|
||||||
"p")
|
"d")
|
||||||
local remote="${2:-origin}"
|
local remote="${2:-origin}"
|
||||||
|
|
||||||
git pull "$remote" $(git rev-parse --abbrev-ref HEAD)
|
git pull "$remote" $(git rev-parse --abbrev-ref HEAD)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
# Push commited changes (current branch) to a remote (defaults to "origin"). "u" for upload.
|
||||||
|
"u")
|
||||||
|
local remote="${2:-origin}"
|
||||||
|
|
||||||
|
git push --set-upstream "$remote" $(git rev-parse --abbrev-ref HEAD)
|
||||||
|
;;
|
||||||
|
|
||||||
|
# Create a git "Work in Progress" commit with timestamps
|
||||||
|
"w")
|
||||||
|
git commit -m "wip: $(date +%Y-%m-%dT%H:%M:%S%z) ($(date +%s))"
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
git status
|
git status
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Add table
Reference in a new issue