Skip to main content

ghit Command Line Utility

⚠️ Work in progress.

Features

  • Stack display with ghit ls or ghit -v ls shows:
    • the branch tree
    • the relation to the base branch state
    • the PR state, if any
    • the unresolved PR comments, if any
  • Stack navigation (checkout):
    • ghit up, ghit down, ghit top, ghit bottom
  • Stack initialization with ghit init:
    • creates .ghit/stack with the current branch as the main branch
    • adds .ghit/.gitignore
  • Stack manipulation: ghit branch create <name>:
    • create and switch to the new branch
    • add the branch name to .ghit/stack
  • Stack or branch publication with ghit stack submit or ghit branch submit:
    • pushes branch(es) upstream with no force, so may fail after rebase
    • creates or updates GitHub PR(s)
    • creates or updates dependencies comment(s)
  • Check stack with ghit stack check:
    • branches in a stack sit on the heads of their parents
    • suggests rebase commands
    • suggests to delete local branches if there are merged or closed PRs

Installation

python3 -m pip install ghit-smartptr

Example Flow

localhost:my-git-repo (main)$ ghit init
localhost:my-git-repo (main)$ cat .ghit/stack 
main
localhost:my-git-repo (main)$ ghit branch create new-feature
Checked-out new-feature.
The branch doesn't have an upstream.
localhost:my-git-repo (new-feature)$ cat .ghit/stack 
main
.new-feature
localhost:my-git-repo (new-feature)$ git add .
localhost:my-git-repo (new-feature)$ git commit
localhost:my-git-repo (new-feature)$ ghit ls
  main
⯈ └─ new-feature *
localhost:my-git-repo (new-feature)$ ghit stack submit
Pushed new-feature to remote git@github.com:me/my-git-repo.git.
Set upstream to origin/new-feature.
Created PR #73 (OPEN).
localhost:my-git-repo (new-feature)$ ghit ls
  main
⯈ └─ new-feature #73 (OPEN)✓ new-feature
localhost:my-git-repo (new-feature)$ ghit top
Checked-out main.
localhost:my-git-repo (main)$ ghit ls
⯈ main
  └─ new-feature #73 (OPEN)✓ new-feature

Metadata

Release files for ghit-smartptr 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ghit-smartptr 0.1.5
File Size Uploaded
ghit_smartptr-0.1.5.tar.gz 20.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ghit-smartptr 0.1.5
File Interpreter ABI Platform
ghit_smartptr-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 43.8 kB

Release files / ghit_smartptr-0.1.5.tar.gz

Download URL ghit_smartptr-0.1.5.tar.gz
Size 20.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9e3dac92913affe64765037108efe415a2dbfea413e4df61e4a4988e7b5a7f96
BLAKE2b-256 checksum
How to use checksums
109682351ce2816d35f33edd7ee0e9a9bb14bfe87429d806dfb43f1c60fc70c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / ghit_smartptr-0.1.5-py3-none-any.whl

Download URL ghit_smartptr-0.1.5-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a919aa1daaf7ddd9b49d7ef5d6133dca686e53c6e8deaa25d9baa2266d0b24fd
BLAKE2b-256 checksum
How to use checksums
62e2095c95a6c25feb20dd4fb60c3136712a2a61d3ac8ab7714dc9babe4d6643
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.0

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page