ghit
Project description
ghit
Command Line Utility
:warning: Work in progress.
Features
- Stack display with
ghit ls
orghit -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
- creates
- 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
orghit 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ghit-smartptr-0.0.9.tar.gz
(21.2 kB
view hashes)
Built Distribution
Close
Hashes for ghit_smartptr-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8645b3616d727506e6152b15f21d1678908a5fa83c7375daae25f3166760926 |
|
MD5 | 14a0db2ce7cfe9ea9e0c37ac3fb16f1d |
|
BLAKE2b-256 | 63eb5c0aa187fecb86784cc6e90e6fd7b9d97a2206ae5f5dc05af318bf8f80dd |