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

On failure of a pre-commit hook, run git stash pop #762

Open
Kenyon-Prater-Baller opened this issue Aug 21, 2021 · 0 comments
Open

On failure of a pre-commit hook, run git stash pop #762

Kenyon-Prater-Baller opened this issue Aug 21, 2021 · 0 comments

Comments

@Kenyon-Prater-Baller
Copy link

I'm getting an error in the pre-commit hook run (I don't have any pre-commit hooks, but that's another issue). When the program finishes running, files have been stashed (as is mentioned in the README) but are not restored.

kenyon@Kenyons-MacBook-Pro ~b % git status
On branch BBS-3445-b
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   db/schema.rb

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   .git_hooks/post_commit/run_annotate_models.rb
	modified:   .overcommit.yml
kenyon@Kenyons-MacBook-Pro ~b % git commit       
Unable to setup environment for pre-commit hook run:
STDOUT:
STDERR:Signature of configuration file has changed!
Run `overcommit --sign` once you've verified the configuration changes.
For more information, see https://github.com/sds/overcommit#security
kenyon@Kenyons-MacBook-Pro ~b % git status
On branch dev
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   file1.txt

kenyon@Kenyons-MacBook-Pro ~b % git stash pop
On branch dev
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
	modified:   file1.txt

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   file2.txt
	modified:   file3.txt
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

No branches or pull requests

1 participant