Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions js/controlbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,34 @@ function(_yargs, d3, demos) {

document.getElementById('last-command').textContent = entry

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('redo = Redo the last undone git command')
this.info('mode = Change mode')
this.info('clear = Clear the history pane and reset the visualization')
this.info()
this.info('Available Git Commands:')
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?

this.info('`git commit`')
this.info('`git config`')
this.info('`git fetch`')
this.info('`git log`')
this.info('`git merge`')
this.info('`git pull`')
this.info('`git push`')
this.info('`git rebase`')
this.info('`git reflog`')
this.info('`git reset`')
this.info('`git rev_parse`')
this.info('`git revert`')
this.info('`git tag`')
return
}

if (entry.trim() === 'pres()') {
window.pres()
return
Expand Down