From 903b16d79e1198b54fd0a8b2ffa4b560125c5d95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Fo=CC=88rster?= Date: Sat, 1 Feb 2025 20:02:37 +0100 Subject: [PATCH 1/3] cleanup --- .tigrc | 190 ++++++++++++++++++++++++++++----------------------------- 1 file changed, 95 insertions(+), 95 deletions(-) diff --git a/.tigrc b/.tigrc index 6b21917..983abe2 100644 --- a/.tigrc +++ b/.tigrc @@ -19,19 +19,19 @@ bind generic b view-refs # # # Blame view bind generic b view-blame -# + # # Cursor -# bind generic J move-page-down -# bind generic K move-page-up -# -# # Copy commit id -# bind generic ` @bash -c "echo -n '%(commit)' | pbcopy" -# -# # Quit tig -# bind generic quit +bind generic J move-page-down +bind generic K move-page-up + +# Copy commit id +bind generic ` @bash -c "echo -n '%(commit)' | pbcopy" + +# Quit tig +bind generic quit # === Commands === -# # Commit +# Commit bind generic C !git commit bind refs C !git commit bind main C !git commit @@ -44,90 +44,90 @@ bind generic P ?git push -u %(remote) %(repo:head) bind generic p ?git push -u -f %(remote) %(repo:head) # Pull -# bind generic U ?git pull %(remote) -# -# # Fetch -# bind generic F ?git fetch %(remote) -# bind main F ?git fetch %(remote) +bind generic U ?git pull %(remote) + +# Fetch +bind generic F ?git fetch %(remote) +bind main F ?git fetch %(remote) # # # Reflog -# bind generic L !sh -c "git reflog --pretty=raw | tig --pretty=raw" -# bind generic _ ?git reset --hard HEAD@{"%(prompt Enter HEAD@{} number: )"} -# -# # Reset --hard -# bind main H ?git reset --hard %(commit) -# bind refs H ?git reset --hard %(commit) -# bind status H ?git checkout -- %(file) -# -# # Checkout(move) to branch -# bind main = ?git checkout %(branch) -# bind refs = ?git checkout %(branch) -# # 前に使用していたブランチへ戻る -# bind generic = ?git checkout - -# -# # Merge -# bind main M ?git merge %(branch) -# bind diff M ?git merge %(branch) -# bind refs M ?git merge %(branch) -# bind main m ?git merge %(commit) -# bind diff m ?git merge %(commit) -# -# # Rebase -# bind main R ?git rebase %(branch) -# bind diff R ?git rebase %(branch) -# bind refs R ?git rebase %(branch) -# bind main r ?git rebase %(commit) -# bind diff r ?git rebase %(commit) -# -# # Rebase -i -# bind main i ?git rebase -i %(branch) -# bind diff i ?git rebase -i %(branch) -# bind refs i ?git rebase -i %(branch) -# bind main i ?git rebase -i %(commit) -# bind diff i ?git rebase -i %(commit) -# -# # Rebase options -# bind generic y ?git rebase --continue -# bind generic c ?git rebase --abort -# -# -# # diff -# bind main D ?sh -c "git diff %(commit)..%(prompt Enter commit ID: ) | tig" -# bind diff D ?sh -c "git diff %(commit)..%(prompt Enter commit ID: ) | tig" -# -# # Remove branch -# bind refs D ?git branch -d %(branch) -# bind refs D ?git branch -D %(branch) -# -# # Stash -# bind generic S !git stash -# -# # Revert -# bind main ! ?git revert %(commit) -# -# # Cherry-pick -# bind main k ?git cherry-pick %(commit) -# bind diff k ?git cherry-pick %(commit) -# -# # Create branch -# bind main B ?git checkout -b "%(prompt Enter branch name: )" %(branch) -# bind refs B ?git checkout -b "%(prompt Enter branch name: )" %(branch) -# bind main b ?git checkout -b "%(prompt Enter branch name: )" %(commit) -# -# -# # === Github === -# # Open to brouse -# bind main ; @hub browse -- commit/%(commit) -# bind blame ; @hub browse -- commit/%(commit) -# bind diff ; @hub browse -- commit/%(commit) -# bind tree ; @hub browse -- blob/%(branch)/%(file) -# bind blob ; @hub browse -- blob/%(branch)/%(file) -# bind grep ; @hub browse -- blob/%(branch)/%(file) -# -# # Pull request -# bind main w @hub browse -- compare/%(branch)?expand=1 -# bind diff w @hub browse -- compare/%(branch)?expand=1 -# bind refs w @hub browse -- compare/%(branch)?expand=1 -# -# # === Theme === -# # General colors +bind generic L !sh -c "git reflog --pretty=raw | tig --pretty=raw" +bind generic _ ?git reset --hard HEAD@{"%(prompt Enter HEAD@{} number: )"} + +# Reset --hard +bind main H ?git reset --hard %(commit) +bind refs H ?git reset --hard %(commit) +bind status H ?git checkout -- %(file) + +# Checkout(move) to branch +bind main = ?git checkout %(branch) +bind refs = ?git checkout %(branch) +# 前に使用していたブランチへ戻る +bind generic = ?git checkout - + +# Merge +bind main M ?git merge %(branch) +bind diff M ?git merge %(branch) +bind refs M ?git merge %(branch) +bind main m ?git merge %(commit) +bind diff m ?git merge %(commit) + +# Rebase +bind main R ?git rebase %(branch) +bind diff R ?git rebase %(branch) +bind refs R ?git rebase %(branch) +bind main r ?git rebase %(commit) +bind diff r ?git rebase %(commit) + +# Rebase -i +bind main i ?git rebase -i %(branch) +bind diff i ?git rebase -i %(branch) +bind refs i ?git rebase -i %(branch) +bind main i ?git rebase -i %(commit) +bind diff i ?git rebase -i %(commit) + +# Rebase options +bind generic y ?git rebase --continue +bind generic c ?git rebase --abort + + +# diff +bind main D ?sh -c "git diff %(commit)..%(prompt Enter commit ID: ) | tig" +bind diff D ?sh -c "git diff %(commit)..%(prompt Enter commit ID: ) | tig" + +# Remove branch +bind refs D ?git branch -d %(branch) +bind refs D ?git branch -D %(branch) + +# Stash +bind generic S !git stash + +# Revert +bind main ! ?git revert %(commit) + +# Cherry-pick +bind main k ?git cherry-pick %(commit) +bind diff k ?git cherry-pick %(commit) + +# Create branch +bind main B ?git checkout -b "%(prompt Enter branch name: )" %(branch) +bind refs B ?git checkout -b "%(prompt Enter branch name: )" %(branch) +bind main b ?git checkout -b "%(prompt Enter branch name: )" %(commit) + + +# === Github === +# Open to brouse +bind main ; @hub browse -- commit/%(commit) +bind blame ; @hub browse -- commit/%(commit) +bind diff ; @hub browse -- commit/%(commit) +bind tree ; @hub browse -- blob/%(branch)/%(file) +bind blob ; @hub browse -- blob/%(branch)/%(file) +bind grep ; @hub browse -- blob/%(branch)/%(file) + +# Pull request +bind main w @hub browse -- compare/%(branch)?expand=1 +bind diff w @hub browse -- compare/%(branch)?expand=1 +bind refs w @hub browse -- compare/%(branch)?expand=1 + +# === Theme === +# General colors From 7c31a7e37e02f3179d992bfeadedfa0be5fa3729 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Fo=CC=88rster?= Date: Mon, 10 Feb 2025 20:14:09 +0100 Subject: [PATCH 2/3] update ascii --- functions | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/functions b/functions index 8f7f213..4c4e2ef 100644 --- a/functions +++ b/functions @@ -7,15 +7,14 @@ udot() { remote=$(git ls-remote origin | awk "/HEAD/ {print \$1}") gstatus=$(git status --porcelain) - echo -e "" - echo -e ' ____ U ___ u _____ _____ _ U _____ u ____ ' - echo -e ' | _"\ \/"_ \/|_ " _| |" ___| ___ |"| \| ___"|// __"| u ' - echo -e ' /| | | | | | | | | | U| |_ u |_"_| U | | u | _|" <\___ \/ ' - echo -e ' U| |_| |\.-,_| |_| | /| |\ \| _|/ | | \| |/__ | |___ u___) | ' - echo -e ' |____/ u \_)-\___/ u |_|U |_| U/| |\\u |_____| |_____| |____/>> ' - echo -e ' |||_ \\\\ _// \\\\_ )(\\\\,-.-,_|___|_,-.// \\\\ << >> )( (__)' - echo -e ' (__)_) (__) (__) (__)(__)(_/ \_)-´ `-(_/(_")("_)(__) (__)(__) ' - echo -e "" + echo -e ' ____ U ___ u _____ _____ _ U _____ u ____ ' + echo -e ' | _"\ \/"_ \/|_ " _| |" ___| ___ |"| \| ___"|// __"| u' + echo -e '/| | | | | | | | | | U| |_ u |_"_| U | | u | _|" <\___ \/ ' + echo -e 'U| |_| |\.-,_| |_| | /| |\ \| _|/ | | \| |/__ | |___ u___) | ' + echo -e ' |____/ u \_)-\___/ u |_|U |_| U/| |\u |_____| |_____| |____/>>' + echo -e ' |||_ \\ _// \\_ ) ( \\,-.-,_ // \\ )( (__) ' + echo -e ' (__)_) (__) (__) (__)(__) (_/ \_) (_/ (_") (__) (_/ \_) ' + echo -e '' echo -e "$info" echo -e "" From 8b53c4cb53ba0a47f681dcd968100d63e417cc6d Mon Sep 17 00:00:00 2001 From: GitButler Date: Mon, 10 Feb 2025 20:24:03 +0100 Subject: [PATCH 3/3] GitButler Workspace Commit This is a merge commit the virtual branches in your workspace. Due to GitButler managing multiple virtual branches, you cannot switch back and forth between git branches and virtual branches easily. If you switch to another branch, GitButler will need to be reinitialized. If you commit on this branch, GitButler will throw it away. Here are the branches that are currently applied: - cleanup (refs/gitbutler/cleanup) branch head: 7c31a7e37e02f3179d992bfeadedfa0be5fa3729 For more information about what we're doing here, check out our docs: https://docs.gitbutler.com/features/virtual-branches/integration-branch