mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-27 08:28:50 +02:00
have basic command line history down
This commit is contained in:
parent
513315af3c
commit
9b62f06bc2
2 changed files with 47 additions and 6 deletions
|
@ -104,11 +104,14 @@ GitEngine.prototype.commit = function() {
|
|||
if (this.currentOptions['--amend']) {
|
||||
targetCommit = this.resolveId('HEAD~1');
|
||||
}
|
||||
if (this.currentOptions['-a']) {
|
||||
events.trigger('commandProcessWarn', 'No need to add files in this demo');
|
||||
}
|
||||
|
||||
var newCommit = this.makeCommit(targetCommit);
|
||||
|
||||
if (this.getDetachedHead()) {
|
||||
events.trigger('commandProcessWarn', "Warning!! Detached HEAD state");
|
||||
events.trigger('commandProcessWarn', 'Warning!! Detached HEAD state');
|
||||
} else {
|
||||
var targetBranch = this.HEAD.get('target');
|
||||
targetBranch.set('target', newCommit);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue