I'm deploying an app to Heroku, which means pushing to their git repo. When do git push heroku master
(or the equivalent remote alias) I get this warning:
WARNING: You're about to push to master, is that what you intended? [y|n]
Which is kinda annoying but not a big deal. However, I'm now scripting deployments so I don't want to have interact with the script - how I do get my bash script to answer y
automatically?
I tried doing yes | git push heroku master
but that doesn't work.
Agree with @bk2204, I would check if a git hook is being used that you are unaware of.
Git hooks are not version controlled, so make sure you are searching for this at the machine where you get this error.
The git hook may live elsewhere other than the .git
directory. Check if git config core.hooksPath
is set and if so, it will point to the directory where your git hook is.
The hook file that you are looking for will most likely have the name pre-push
. The solution in this case is to remove or rename this hook file, and git won't run it before push.
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