Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Nov 5, 2024
Merged

Conversation

bittner
Copy link
Contributor

@bittner bittner commented Sep 30, 2023

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • If my change requires a change to the documentation, I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • 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
Copy link
Contributor Author

bittner commented Oct 1, 2023

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

@bittner
Copy link
Contributor Author

bittner commented Nov 2, 2023

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).
@bittner
Copy link
Contributor Author

bittner commented Nov 17, 2023

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
Copy link
Contributor Author

bittner commented Feb 6, 2024

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

@bittner
Copy link
Contributor Author

bittner commented Mar 10, 2024

Hey there, this is an easy one! No conflicts, no difficult decisions. Please review and merge! Now. 💯 🎸 🕺 😃

Copy link
Contributor

@seefood seefood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@seefood seefood merged commit 9f92a29 into Bash-it:master Nov 5, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants