Add "git undo commit" and update README
This commit is contained in:
parent
d77cda3a31
commit
65a868210d
2 changed files with 13 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ same control as git but without the headache of its impossible to remember comma
|
||||||
### Goals
|
### Goals
|
||||||
* CONSISTANCY
|
* CONSISTANCY
|
||||||
* Fewer, more orthogonal commands
|
* Fewer, more orthogonal commands
|
||||||
* More useful built-in behaviors
|
* More useful (and non-destructive) default behaviors
|
||||||
|
|
||||||
### Commands
|
### Commands
|
||||||
(bound to get out of date quickly)
|
(bound to get out of date quickly)
|
||||||
|
|
@ -37,6 +37,9 @@ get diff STAGE | compare working tree with stage (git diff)
|
||||||
get diff %REF% | compare working tree with %REF% (git diff %REF%)
|
get diff %REF% | compare working tree with %REF% (git diff %REF%)
|
||||||
get diff STAGE %REF% | compare stage with %REF% (git diff --cached %REF%)
|
get diff STAGE %REF% | compare stage with %REF% (git diff --cached %REF%)
|
||||||
get diff %REFA% %REFB% | compare %REFA% with %REFB% (git diff %REFA% %REFB%)
|
get diff %REFA% %REFB% | compare %REFA% with %REFB% (git diff %REFA% %REFB%)
|
||||||
|
get undo commit | git reset --soft HEAD~1
|
||||||
|
get push | pushes to upstream. If upstream not set, prompt user to name a remote branch. (If multiple remotes exist, prompt for which remote to use.)
|
||||||
|
get clone %PATH% | %PATH% can be a normal url. Paths like "username/repo" will be expanded assuming a Github. Paths with just "repo" will expand to a Github url, if your Github username is stored in git config.
|
||||||
|
|
||||||
### TODO
|
### TODO
|
||||||
Now that I've added tab completion, I think "stage" and "status" are too similar.
|
Now that I've added tab completion, I think "stage" and "status" are too similar.
|
||||||
|
|
|
||||||
9
bin/get
9
bin/get
|
|
@ -54,6 +54,15 @@ else
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
undo)
|
||||||
|
case "$2" in
|
||||||
|
commit)
|
||||||
|
echo Undoing last commit
|
||||||
|
git reset --soft HEAD~1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
branch)
|
branch)
|
||||||
echo 'Switching to branch'
|
echo 'Switching to branch'
|
||||||
if [ -z "$2" ]; then
|
if [ -z "$2" ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue