mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-19 18:25:18 +02:00
Merging now worksgit status! and have some nice graph exploration
This commit is contained in:
parent
af76c03ad1
commit
6cb4c6b4a1
7 changed files with 206 additions and 52 deletions
|
@ -12,11 +12,11 @@ function Command(str) {
|
|||
|
||||
Command.prototype.getShortcutMap = function() {
|
||||
return {
|
||||
'git commit': /^gc/,
|
||||
'git add': /^ga/,
|
||||
'git checkout': /^gchk/,
|
||||
'git rebase': /^gr/,
|
||||
'git branch': /^gb/
|
||||
'git commit': /^gc($|\s)/,
|
||||
'git add': /^ga($|\s)/,
|
||||
'git checkout': /^gchk($|\s)/,
|
||||
'git rebase': /^gr($|\s)/,
|
||||
'git branch': /^gb($|\s)/
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -30,7 +30,8 @@ Command.prototype.getRegexMap = function() {
|
|||
rebase: /^rebase($|\s)/,
|
||||
reset: /^reset($|\s)/,
|
||||
branch: /^branch($|\s)/,
|
||||
revert: /^revert($|\s)/
|
||||
revert: /^revert($|\s)/,
|
||||
merge: /^merge($|\s)/
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -78,7 +79,7 @@ Command.prototype.parse = function(str) {
|
|||
_.each(this.getShortcutMap(), function(regex, method) {
|
||||
var results = regex.exec(str);
|
||||
if (results) {
|
||||
str = method + str.slice(results[0].length);
|
||||
str = method + ' ' + str.slice(results[0].length);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -155,6 +156,7 @@ OptionParser.prototype.getMasterOptionMap = function() {
|
|||
reset: {
|
||||
'--hard': false,
|
||||
},
|
||||
merge: {},
|
||||
rebase: {},
|
||||
revert: {}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue