Open PhilipOakley opened 3 years ago
An option to select common arguments, or set environment variables per-commit, would be really great! Other than basic actions like changing name & date (where I strongly disagree with default behavior of --amend, which keeps the Author and replaces Committer, as I usually want to override either both of them, or neither of them), an example use-case may be disabling Husky pre-commit hooks when creating a quick WIP draft commit before cherry-picking, switching, or resetting between others before creating a "real" commit. I'd be okay with either a textbox to write additional arguments, a configurable check-box, or even an option to set ENV variable; which right now isn't possible even using Tools, as an attempt to set an ENV globally via new command doesn't affect the commit.
git filter-branch --env-filter 'export GIT_COMMITTER_DATE=\"$GIT_AUTHOR_DATE\"' $REVISION^1..HEAD && git update-ref -d refs/original/refs/heads/$(git rev-parse --abbrev-ref HEAD)
, which I've had to add within Tools for a daily usage (named it "Update Committer Date (Since $REVISION)").
I wanted to create an initial commit to a new repo that was backdated, and had many of the classic environment variables (committer & author name, date, and perhaps --allow-empty, --orphan, etc) adjusted. This feels like this need a moderately common tasks where hindsight [foresight] would have been a great thing.
I thought it worth logging the Idea that the GUI should have, within the Commit menu dropdown, an "All options Commit" dialog. Food for thought anyway (I'll just have to use the command line in the mean time)