-
Notifications
You must be signed in to change notification settings - Fork 280
Add help command? #86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@IanLee1521 this is a great idea. Thanks for starting the conversation and submitting a PR :)
I'm down to merge this in, though I added a couple of comments for tweaks we could make. Another thought, which doesn't necessarily need to be implemented in this PR, is to add a brief description of each command, for example -
git rebase - Reapply commits on top of another base tip
Though I can see how that might clutter up the output of the help command. Alternatively we could have a --help flag for each individual command with the description of the command and the flags we support in the tool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could also add clear = restore to initial state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think we should remove git clean from the tool, seeing as how it removes untracked files in the working directory and this tool is only concerned with the commit graph
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kuychaco , would an alternate approach be to add the git add functionality, which would make some sort of dirty indicator on the commit and then leave in git clean, and also making git reset --hard without a ref do the right thing of clearing the dirty bit?
...
I guess that would get into the realm of needing to manage unstaged and untracked files though... Yeah, perhaps you're right. :) Arguably that could be a separate pull request though?
6504d0e to
33a5f5a
Compare
Would a
help()command be ... helpful?I started some work as a proof of concept, but not sure if it's desirable. Might be incomplete at the moment, and it's currently a manual process to add new / missing commands. Not sure if there is a way to introspect in JS to get the functions, but that might be a better way...?
Anyways, just demonstrating an idea, and opening up a conversation.