chriswalz / bit

Bit is a modern Git CLI
Apache License 2.0
6.05k stars 106 forks source link

Feature request: integration Git Town #87

Open chriswalz opened 3 years ago

chriswalz commented 3 years ago

https://github.com/git-town/git-town#commands

sheldonhull commented 2 years ago

Any tips on this @chriswalz? I would like to contribute improvements to "plugin" a few workflow oriented commands for folks, and knowing where it might fit would be really cool. In chats with Git Town there are some stable package commands that could be used directly, or the binary can be invoked to get a lot of the sync oriented workflow for short lived branches as well.

Any contribution guide would be useful to jump start. I know git workflow, so that's not the problem, I mean more if you have some preference for packages/locations/etc to add.

thanks again for such a cool project. I always recommend to new folks on projects to alias alias git=bit to help them use git more productively and quickly ;-)

chriswalz commented 2 years ago

Hi @sheldonhull glad to see your support for bit.

Here are a couple of good example files to highlight how to add a new command (in this case bit release) :

Line 64 - notice release is specified as a sub command https://github.com/chriswalz/bit/blob/559852d542575f2415a480059e587cd50078012b/main.go#L64

The core functionality to make the release command resides here https://github.com/chriswalz/bit/blob/master/cmd/release.go

To get the suggestions to show up for bit release when you type bit see lines 54-59. https://github.com/chriswalz/bit/blob/master/cmd/suggestion_tree.go#L54

There are util functions for running git commands here: https://github.com/chriswalz/bit/blob/master/cmd/git.go

Feel free to ping me if you have any questions. The above I think should help you get started