-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #865 from pkitszel/pkitszel-git-abort
- Loading branch information
Showing
8 changed files
with
188 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
gitdir="$(git rev-parse --git-dir)" || exit | ||
opfound= | ||
fcnt= | ||
for i in cherry-pick merge rebase; do | ||
f=${i^^} | ||
f=${f/-/_} | ||
test -f "${gitdir}/${f}_HEAD" && fcnt=1$fcnt && opfound=$i | ||
done | ||
|
||
if [ "${fcnt}" != 1 ]; then | ||
echo "I don't know what to abort" >&2 | ||
exit 1 | ||
fi | ||
|
||
git "${opfound}" --abort |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
.\" generated with Ronn-NG/v0.8.0 | ||
.\" http://github.com/apjanke/ronn-ng/tree/0.8.0 | ||
.TH "GIT\-ABORT" "1" "August 2020" "" "Git Extras" | ||
.SH "NAME" | ||
\fBgit\-abort\fR \- Abort current git operation | ||
.SH "SYNOPSIS" | ||
\fBgit\-abort\fR | ||
.SH "DESCRIPTION" | ||
Abort current git rebase, merge or cherry\-pick process\. | ||
.SH "OPTIONS" | ||
There are no options, it just aborts current operation\. | ||
.SH "EXAMPLES" | ||
\fBgit\-abort\fR | ||
.SH "AUTHOR" | ||
Written by Przemek Kitszel <\fI\%mailto:pkitszel@gmail\.com\fR> | ||
.SH "REPORTING BUGS" | ||
<\fI\%https://github\.com/tj/git\-extras/issues\fR> | ||
.SH "SEE ALSO" | ||
<\fI\%https://github\.com/tj/git\-extras\fR> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
git-abort(1) -- Abort current git operation | ||
================================ | ||
|
||
## SYNOPSIS | ||
|
||
`git-abort` | ||
|
||
## DESCRIPTION | ||
|
||
Abort current git rebase, merge or cherry-pick process. | ||
|
||
## OPTIONS | ||
|
||
There are no options, it just aborts current operation. | ||
|
||
## EXAMPLES | ||
|
||
`git-abort` | ||
|
||
## AUTHOR | ||
|
||
Written by Przemek Kitszel <<[email protected]>> | ||
|
||
## REPORTING BUGS | ||
|
||
<<https://github.com/tj/git-extras/issues>> | ||
|
||
## SEE ALSO | ||
|
||
<<https://github.com/tj/git-extras>> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters