wip: 2025-06-06T08:31:44+0200 (1749191504)

This commit is contained in:
Victor Westerlund 2025-06-06 08:31:44 +02:00
parent 9a91c12b6d
commit 9d8ae59e77
Signed by: vlw
GPG key ID: D0AD730E1057DFC6

View file

@ -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
;; ;;