Package: git-well
Read the docshttps://python-git-well.readthedocs.ioGithubhttps://github.com/Erotemic/git_wellPypihttps://pypi.org/project/git_wellGit Well is a collection of git command line tools and is also a Python
module.Installing this module installs thegit-wellcommand, which is a modal CLI
into several new git commands. These git commands are also exposed as
standalone “git” executables.In other words after you:pipinstallgit-wellTo get CLI argument completion installautocomplete, and you can enable global
auto-completionpipinstallargcompletemkdir-p~/.bash_completion.dactivate-global-python-argcomplete--dest~/.bash_completion.dsource~/.bash_completion.d/python-argcompleteAnd add this to your .bashrcif[-f"$HOME/.bash_completion.d/python-argcomplete"];then# shellcheck disable=SC1091source"$HOME"/.bash_completion.d/python-argcompletefiNOTE: if you know of a way to make this easier please let me know!Then you can run# Show all the commands exposed by this repo.gitwell--helpgitwellsync--help# ORgitsyncTop Level CLI:usage: git-well [-h] {squash_streaks,branch_upgrade,sync,branch_cleanup,track_upstream,rebase_add_continue,remote_protocol,discover_remote} ...

options:
  -h, --help            show this help message and exit

commands:
  {squash_streaks,branch_upgrade,sync,branch_cleanup,track_upstream,rebase_add_continue,remote_protocol,discover_remote}
                        specify a command to run
    squash_streaks      Squashes consecutive commits that meet a specified criteiron.
    branch_upgrade      Upgrade to the latest "dev" branch. I.e. search for the branch
    sync                Sync a git repo with a remote server via ssh
    branch_cleanup      Cleanup branches that have been merged into main.
    track_upstream      Set the branch upstream with sensible defaults if possible.
    rebase_add_continue
                        A single step to make rebasing easier.
    remote_protocol     Helper to change a remote from https to ssh / git for a specific user /
    discover_remote     Attempt to discover a ssh remote based on an ssh host.The tools in this module are derived from:https://github.com/Erotemic/git-synchttps://github.com/Erotemic/local/tree/main/git_toolsUse CasesHave you ever run into this error when you rungit pull?There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.

    git pull <remote> <branch>

If you wish to set tracking information for this branch you can do so with:

    git branch --set-upstream-to=origin/<branch> the_current_branchI find this a huge pain because it can’t even be bothered to fill in<branch>so you have to munge the command to type:git branch --set-upstream-to=origin/the_current_branch the_current_branchI get why they did this, the branch on the remote might have a different name.
But… it usually doesn’t. That’s why I implementedgit-welltrack-upstream.Running this instead will detect if you are in the simple case and just do it
for you. Otherwise it will enumerate your options and ask you to pick one.I’ve found this command to prevent so much disruption that instaling git-well
installgittrack-upstreamas its own command.