Last active
October 1, 2023 14:30
-
-
Save jasonsparc/736ef0e0bcac7025addf8a4ac3e1cc16 to your computer and use it in GitHub Desktop.
`git-cheat-reword` – Authentic rewords ( ͡° ͜ʖ ͡°)
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
#!/bin/bash | |
# Usage: git cheat-reword | |
git rev-parse || exit $? | |
if [[ $1 == "-q" ]]; then | |
if_quiet="-q"; shift | |
else | |
echo "Rewording... (with author date as committer date)" | |
fi | |
# Stash if the index contains uncommitted changes. | |
if ! git diff-index --cached --quiet HEAD --ignore-submodules --; then | |
git stash $if_quiet | |
did_stash=1 | |
fi | |
export GIT_COMMITTER_DATE="$(git log -1 --date="iso" --format="%ad")" | |
git commit $if_quiet --amend --date="$GIT_COMMITTER_DATE" | |
if [[ $did_stash = 1 ]]; then | |
git stash pop --index $if_quiet | |
fi |
any plans for ahk2.0 version?)
@BlackburnUTG I don't know about what you mean. The above is for bash.
Perhaps you accidentally commented on the wrong gist?
@BlackburnUTG I don't know about what you mean. The above is for bash.
Perhaps you accidentally commented on the wrong gist?
oh, yeah.. sorry.
I was tried to ask in your "AutoHotkey, Accelerated Scrolling v1.3, By BoffinbraiN" topic
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See also, https://gist.github.com/jasonsparc/b0c7f64ecc30c1ae5ef40abe236fb806