Alias-based opinionated git.
Idiot-proofing your git experience with git aliases. No extra tools, no fuss, just standardized, opinionated aliases for the 80% use case.
Intended for OSX users that use Github or Github Enterprise. Automagically uses the right 'trunk' for the situation - (upstream or origin, master or main...) - without you having to remember all that jazz.
Either run
./install.sh
And follow the instructions
... Or
Just copy the aliases from this .gitconfig
into your .gitconfig
.
If applicable, replace the enterprisehost = "!echo 'your.enterprise.host'"
, to point at a Github Enterprise instance
Adds shortcuts for a rebase workflow. Assumes a 'trunk' of develompment at either origin or upstream remotes. Assumes Github and/or Github Enterprise.
Pushes local changes to the current branch at origin. Rejects if local branch is not up to date (ie your buddy made changes). See force-with-lease
Sync up current branch corresponding branch at trunkiest-trunk available. Either master or main. If you have 'upstream' it prefers the upstream, but falls back to origin.
Does a rebase with main/master on that remote.
Sync this branch with it's corresponding branch at origin. So if your buddy is working on this branch too, you can get their changes.
Squash your changes into a single commit relative to main branch's HEAD commit - starts an interactive rebase relative to that commit.
Loads a diff to open/view PR to main (or master) branch at trunkiest trunk.
Inspired by this shortcut. Useful to jump to the PR to see review comments, create a PR, or view a diff in Github.
Opens the trunkiest-trunk available on Github (prefes upstream to origin; prefers github.com to your Github enterprise if available)
Useful to browse issues, PRs, etc on that repo.
Amend the last commit with a new change.
- Just solve the 80% use case most people have for interacting/syncing with remotes
- Don't replace git, just augment it
- Expect users to use git for anything beyond the 80%, which will be most of the time