Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
kuychaco merged 2 commits into git-school:gh-pages from IanLee1521:add-help
Mar 7, 2018
Merged

Add help command? #86

kuychaco merged 2 commits into git-school:gh-pages from IanLee1521:add-help
Mar 7, 2018

Conversation

@IanLee1521
Copy link
Contributor

@IanLee1521 IanLee1521 commented Sep 13, 2016

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.

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

@IanLee1521 IanLee1521 Jul 9, 2017

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kuychaco kuychaco kuychaco left review comments

+1 more reviewer

@mikecharles mikecharles mikecharles left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /