当我“推动” git现在说“Create pull request for ...”。为什么? [英] When I "git push" git now says "Create pull request for ...". Why?
问题描述
我正在修改一个分支中的项目,到目前为止,除了我之外,其他人都知道这个项目。然而,从最近开始,当我 我不知道为什么Git会给我这个消息,这是我从未见过的。 即使我删除远程分支(使用 注意:现在可以禁用这些消息。请参阅杰克的回答 前缀为 1 示例这样的 标准输出和标准错误输出都被转发到git send -pack在另一端,所以你可以简单地为用户回显消息。 在服务器上: 客户端: I am making changes to a project in a branch that, so far, is known to no one else but me. However, starting recently, when I I have no idea why Git is giving me this message, which I have never seen before. Even if I delete the remote branch (with " Note: These messages can be disabled now. See Jake's answer. Read along my answer for the technical explanation. Everything that is prefixed by 1 Example of such a Both standard output and standard error output are forwarded to git send-pack on the other end, so you can simply echo messages for the user. On the server: On the client:
这篇关于当我“推动” git现在说“Create pull request for ...”。为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋! remote:为<<<< my branch>>创建拉取请求:
remote:https://bitbucket.org / ...
git push origin:<<< my branch>>< / code>我现在仍然得到这个消息!(我成功地删除了在远程的分支,但消息仍然)
remote:
的所有内容都有已由在服务器上接收脚本 1 。 Bitbucket可能希望让你更容易创建一个请求。
post-receive
钩子使用 echo
来发送消息给用户,正如上面的链接所述。一旦所有推送的数据完全保存在服务器上,它将被调用:
git@example.com:〜/ stackoverflow.git / hooks $ cat post-receive
#!/ bin / bash
echo这是一个在服务器上运行的git钩子的例子
$ git push git@example.com:stackoverflow.git master:master
计数对象:1,完成。
写入对象:100%(1/1),187字节| 0字节/秒,完成。
合计1(delta 0),重用0(delta 0)
remote:这是一个在服务器
上运行的git钩子的示例git@example.com:stackoverflow.git
4751391..01882eb master - >主
git push
to this project, I now receive this as part of the response:remote: Create pull request for <<my branch>>:
remote: https://bitbucket.org/...
git push origin :<<my branch>>
" I now still get this message! (I successfully deleted the branch on the remote, but the message remains)remote:
has been sent by the receiving script1 on the server. Bitbucket probably wants to make it easier for you to create a pull request.
post-receive
hook using echo
to send a message to the user as explained in the link above. It will be called once all the pushed data is completely saved on the server:
git@example.com:~/stackoverflow.git/hooks$ cat post-receive
#!/bin/bash
echo "This is an example of a git hook running at the server"
$ git push git@example.com:stackoverflow.git master:master
Counting objects: 1, done.
Writing objects: 100% (1/1), 187 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
remote: This is an example of a git hook running at the server
To git@example.com:stackoverflow.git
4751391..01882eb master -> master