gpt4 book ai didi

git - 当我 "git push"git 现在说 "Create pull request for ..."。为什么?

转载 作者:IT王子 更新时间:2023-10-29 00:41:52 27 4
gpt4 key购买 nike

我正在对一个分支中的一个项目进行更改,到目前为止,除了我以外没有人知道该分支。然而,最近开始,当我git push对于这个项目,我现在收到这个作为回复的一部分:

remote: Create pull request for <<my branch>>:
remote: https://bitbucket.org/...

我不知道为什么 Git 会给我这条我以前从未见过的消息。

即使我删除远程分支(使用“git push origin :<<my branch>>”我现在仍然收到这条消息!(我成功删除在 Remote 上分支,但消息仍然存在)

最佳答案

注意:现在可以禁用这些消息。参见 Jake's answer .阅读我的回答以获得技术解释。

remote: 为前缀的所有内容均由receiving script 发送1 在服务器上。 Bitbucket 可能想让您更轻松地创建 pull 请求。


1 此类 post-receive Hook 示例使用 echo 向用户发送消息,如上面的链接所述。一旦所有推送的数据完全保存在服务器上,它就会被调用:

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.

在服务器上:

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

关于git - 当我 "git push"git 现在说 "Create pull request for ..."。为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30518603/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com