Bash-it / bash-it

A community Bash framework.
MIT License
14.3k stars 2.29k forks source link

Add git alias `gshn` (`git show --name-only`) #2219

Closed bittner closed 3 weeks ago

bittner commented 1 year ago

Adds a short Git alias for git show --name-only, which list the files affected by the changes only (instead of the full diff).

Description

The Git command git show --name-only list only the files affected by the changes instead of showing the full diff, which comes in handy when you need to know which files were affected w/o being distracted by the full diff of the changes.

The additional git show --name-status shows the current version control status of the listed files. (Maybe interesting to note, this is like a light version of git whatchanged -1.)

Motivation and Context

Just two convenient aliases in addition to gsh (git show) to avoid the need for typing and remembering the lengthy --name-only and --name-status options.

How Has This Been Tested?

I tried it out locally, applied the identical change to my local Bash-it setup.

Verified that there are no alias conflicts by grepping for "gsh" over the repository HEAD.

Types of changes

Checklist:

bittner commented 1 year ago

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

bittner commented 1 year ago

Two small, non-conflicting enhancements for Git.

Merging anyone?

bittner commented 1 year ago

Please, merge! Those are useful Git aliases that help to remember command options you would rarely use when you had to type them in full length.

bittner commented 9 months ago

Any comment on the proposed enhancement? Can this be merged?

bittner commented 8 months ago

Hey there, this is an easy one! No conflicts, no difficult decisions. Please review and merge! Now. :100: :guitar: :man_dancing: :smiley: