From 9d8ae59e777a8d6a69d64f14d58f7ddb9cd5593d Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Fri, 6 Jun 2025 08:31:44 +0200 Subject: [PATCH] wip: 2025-06-06T08:31:44+0200 (1749191504) --- .bash_aliases | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.bash_aliases b/.bash_aliases index dae2b1f..f2d6f7b 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -54,23 +54,30 @@ gitf () { 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) "c") git fetch -p && git branch -vv | awk '/: gone]/{print $1}' | xargs git branch -D ;; - # Pull current branch from a remote (defaults to "origin") - "p") + # Pull current branch from a remote (defaults to "origin"). "d" for download. + "d") local remote="${2:-origin}" 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 ;;