Git post-receive user input

主宰稳场 提交于 2019-12-06 08:45:08

问题


I am trying to implement a database import after a git push origin master, but the problem is I cannot prompt the user for input from post-receive hook in Git. I need to ask the user about the import, if it should happen and for the name of the database export file.

I couldn't find any useful information in Google.


回答1:


The hook itself can only return stdout/stderr, not wait for stdin.

One way would be to push the instructions with the data, for the hook to use.
Another would be to communicate those instructions separately on the server, with the hook knowing where to look.

In both cases, the idea is to get an automated process instead of an interactive one.



来源:https://stackoverflow.com/questions/21243020/git-post-receive-user-input

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!