Skip to content

Conversation

@IanLee1521
Copy link
Contributor

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.

@BinaryMuse
Copy link
Member

/cc @kuychaco

See also #57

@IanLee1521 IanLee1521 mentioned this pull request Sep 15, 2016
Copy link
Contributor

@mikecharles mikecharles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@kuychaco kuychaco left a 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.


if (entry.trim() === 'help' || entry.trim() === 'help()') {
this.info('pres() = Turn on presenter mode')
this.info('undo = Undo the last git command')
Copy link
Member

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

this.info('`git branch`')
this.info('`git checkout`')
this.info('`git cherry_pick`')
this.info('`git clean`')
Copy link
Member

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

Copy link
Contributor Author

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?

@kuychaco kuychaco merged commit 33a5f5a into git-school:gh-pages Mar 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants