bisgit
v0.9.0
Published
Git CLI tool to simplify common advanced git workflows
Readme
Bisgit
Run gi or bisgit for full TUI.
Commands
Commit Tooling
gi sha <commit>copies the shortend sha to clipboard (uses HEAD as default)gi amendcommits with--no-editand--amend. Accepts extra flags too.gi fixup <commit>commits staged changes as aa rebase, and starts an interactive rebase on the target commit if it would not fail.gi savepointmakes a WIP commit with current timestamp.
Merge Helpers
gi backmerge <branch>updates a branch and then merges it into the current branch.gi conflict <branch>shows all conflicts that would occur in a merge.gi abortandgi continueare useful in conflict resolution situations.gi files <ref>shows files of the commit or stash.gi lines <ref> <ref?>shows the number of lines changed. Use-vfor verbose output.
Branching
gi autoprunedeletes any already merged branches.gi rebranchIf conflicts won't exist, create new branch from main and cherry-pick all commits from $gi track <branch>copies a remote branch to a local one and sets the origin upstream.gi yankis a force pull for the current branch. It commits a WIP commit and/or backup branch if commits don't exist in remote. Then it resets the local branch to match the remote. Useful way to handle a collaborator's force push.
Github
gi code-review <pr>checks out a pr and creates a diff similar to github's code review diff viewer.gi whoamishows github username.gi languagesprints the percentages of languages for this repo.gi coauthor <username?>commits with a co-authorship description.
Utility
gi pwdshows repo root path.gi wipeclears all uncommitted trackable filesgi churnshows you the 25 most edited files.gi excludeandgi includeallows you to ignore files locally without modifying the .gitignore file.gi remote-defaultshows whether the remote default branch is 'main', 'master', etc.gi updateupdates the cli via npm
Tips
- If using this in VS Code's integrated terminal, I'd recommend disabling
terminal.integrated.stickyScroll.enabledor adding gi toterminal.integrated.stickyScroll.ignoredCommands
I turned many of my git aliases into commands. The original aliases are found this gist.
This also works as a wrapper for git and gh commands. Some commands that don't normally do anything are given a purpose, such as git switch or git config with no arguments.
