bash-it icon indicating copy to clipboard operation
bash-it copied to clipboard

Short aliases for `git commit --amend` (bang)

Open bittner opened this issue 2 years ago • 8 comments

Description

With a bang (!) character we can make amending a commit intuitively dangerous.

Motivation and Context

The idea is taken from Oh-My-Zsh, https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git

How Has This Been Tested?

I use those aliases for years on my developer laptop. I just made the identical changes to a fresh installation of bash-it on my developer machine. They work as expected.

Checklist:

  • [x] My code follows the code style of this project.
  • [x] If my change requires a change to the documentation, I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.
  • [x] If I have added a new file, I also added it to clean_files.txt and formatted it using lint_clean_files.sh.
  • [ ] I have added tests to cover my changes, and all the new and existing tests pass.

bittner avatar Sep 28 '23 15:09 bittner

The failing of the CI / lint job is likely unrelated to the changes introduced in this PR. – Go error: undefined: any

bittner avatar Sep 28 '23 17:09 bittner

This would be a nice enhancement of the Git aliases. Please, merge!

bittner avatar Nov 02 '23 01:11 bittner

@bittner Could you rebase or amend, then push? The CI runs are too old to re-run.

cornfeedhobo avatar Nov 02 '23 11:11 cornfeedhobo

@bittner Could you rebase or amend, then push? The CI runs are too old to re-run.

Done. CI jobs all pass. Ready for merging?

bittner avatar Nov 03 '23 07:11 bittner

@davidpfarrell @NoahGorny @gaelicWizard Any interest to weigh in here? This introduces the ! suffix. I'm inclined to merge because I've already said I don't think we should be managing these and thus have little opinion on what conventions should be followed. Please let me know soon :)

cornfeedhobo avatar Nov 04 '23 21:11 cornfeedhobo

Note that the bang is inspired by OMZ, hence we're harmonizing with the other framework, which I think is considered a good idea judging from other discussions in this repo.

Please go ahead. I created several PRs for git-aliases, so that integrating them can get discussed in depth. But it should also allow to speed up merging okay-PRs.

If there are no objections, please don't wait any longer. Press the button. Thank you!

bittner avatar Nov 07 '23 17:11 bittner

Can we merge this minor enhancement?

bittner avatar Nov 17 '23 00:11 bittner

Is there any chance to get this PR merged? 🙏

bittner avatar Feb 06 '24 12:02 bittner