My usual git workflow is
<make changes>
git add FILES
git status
git commit -m "some remarks"
where I need the git status
just to check if I added the correct files.
Is there a way to tell git
to automatically display the status after each git add
?
When run with -v
(verbose) option, git add
outputs the name of files that were added:
» git add -v hello?
add 'hello1'
add 'hello2'
Here's what I have using the answer at https://stackoverflow.com/a/26243454 and combining it with devnull's answer:
[alias]
sadd = !sh -c 'cd -- ${GIT_PREFIX:-.} && git add -- "$@" && git status' --
This way you don't need to pass in the working directory manually.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With