Add git alias gshn (git show --name-only)#2219
Merged
seefood merged 1 commit intoBash-it:masterfrom Nov 5, 2024
Merged
Conversation
Contributor
Author
|
The failing of the |
Contributor
Author
|
Two small, non-conflicting enhancements for Git. Merging anyone? |
Adds a short Git alias for `git show --name-only`, which list the files affected by the changes only (instead of the full diff).
Contributor
Author
|
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. |
Contributor
Author
|
Any comment on the proposed enhancement? Can this be merged? |
Contributor
Author
|
Hey there, this is an easy one! No conflicts, no difficult decisions. Please review and merge! Now. 💯 🎸 🕺 😃 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-onlylist 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-statusshows the current version control status of the listed files. (Maybe interesting to note, this is like a light version ofgit 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-onlyand--name-statusoptions.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:
clean_files.txtand formatted it usinglint_clean_files.sh.