mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Merge branch 'integration'
This commit is contained in:
commit
c23784b187
3
Makefile
3
Makefile
|
|
@ -14,7 +14,8 @@ BINS = \
|
|||
git-contrib \
|
||||
git-update-extras \
|
||||
git-extras-version \
|
||||
git-release
|
||||
git-release \
|
||||
git-undo
|
||||
|
||||
install:
|
||||
@echo "... installing to $(PREFIX)/bin"
|
||||
|
|
|
|||
11
Readme.md
11
Readme.md
|
|
@ -207,6 +207,17 @@ Listing commits:
|
|||
* Added --all support to git-count
|
||||
* Initial commit
|
||||
|
||||
## git-undo
|
||||
|
||||
Removes the latest commit
|
||||
|
||||
git undo
|
||||
|
||||
Remove the latest 3 commits:
|
||||
|
||||
git undo 3
|
||||
|
||||
|
||||
## git-update-extras
|
||||
|
||||
Updates git extras. clones the repo to _/tmp/git-extras_, make installs, then cds back to the origin directory.
|
||||
11
bin/git-undo
Executable file
11
bin/git-undo
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
if test $# -eq 0; then
|
||||
git reset --hard HEAD~1
|
||||
else
|
||||
if `echo $1 | grep -q [^[:digit:]]`; then
|
||||
echo $1 is not a number
|
||||
else
|
||||
git reset --hard HEAD~$1
|
||||
fi
|
||||
fi
|
||||
Loading…
Reference in a new issue