什么都没有写在远程旁边:在git中 [英] Nothing written next to remote: in git

查看:55
本文介绍了什么都没有写在远程旁边:在git中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我在一个项目上工作,在文件中进行了更改,并添加(工作正常),git commit(工作正常).但是当我执行git push时,发生了这种情况:

So I was working on a project, made changes in the file and did add (worked fine), git commit (worked fine). But when I did a git push this happened:

1)'remote:'旁边没有写任何东西.它只有一个空行.没有文字,没有信息(甚至没有错误).因此,当我检查github存储库时,这是一个新的提交,但是当我尝试打开提交时,它说错误404找不到页面.

1) It didn't have anything written next to 'remote:'. It had only an empty line. No text, no information (not even error). So When I checked my github repo, these was a new commit but when I tried opening the commit it said error 404 no page found.

2)克隆存储库时,也会发生同样的事情.

2) When cloning the repo same thing happens.

我尝试重新安装git,但是没有用.

I have tried re installing git, but it did not work.

Cloning into 'server'...
remote:                                                                                                                                                                                                                remote:                                                                                                                                                                    remote: Enumerating objects: 4, done.
remote:                                                                         remote:                                                                         remote:                                                                         remote:                                                                         remote:                                                                         remote: Counting objects: 100% (4/4), done.
remote:                                                                         remote:                                                                         remote:                                                                         remote:                                                                         remote:                                                                         remote: Compressing objects: 100% (4/4), done.
remote: Total 1248385 (delta 0), reused 0 (delta 0), pack-reused 1248381
Receiving objects: 100% (1248385/1248385), 716.65 MiB | 949.00 KiB/s, done.
Resolving deltas: 100% (903057/903057), done.
Updating files: 100% (24572/24572), done.

推荐答案

remote:开头的消息是发出的消息,不是由您的 Git发出的,而是由您的Git打电话给的另一个Git发出的.通过互联网.请记住,git fetchgit push都可以通过让您的Git调用其他Git来工作.您的Git与其他Git进行了某种形式的对话,其中您的Git及其Git交换提交和其他相关的哈希ID,以便发送的任何人(您,对于git push;对于c1>,他们都可以发送)提交和相关对象,无论谁接收 都应该拥有,但没有.

Messages prefixed with remote: are messages that were emitted, not by your Git, but by the other Git your Git phoned up over the Internet. Remember that git fetch and git push both work by having your Git call up some other Git. Your Git has a little conversation of sorts with that other Git, in which your Git and their Git exchange commit and other related hash IDs so that whoever is sending (you, for git push; them, for git fetch) can send any commits and related objects that whoever is receiving should have, but doesn't.

此对话故意为其他Git留出了空间,以便其他Git向您的Git发送消息,告知您的Git应该呈现给您.当其他Git发送消息时,您的Git会向您显示消息,并在前面添加单词remote:.

This conversation deliberately leaves room for the other Git to send messages to your Git that your Git should present to you. When that other Git does send messages, your Git shows them to you, adding the word remote: in front.

没有一种简单的方法可以判断给定消息的含义.有些消息(例如enumeratingcounting对象)实际上来自其他Git调用的Git帮助器.您有时会从自己的Git中看到这些相同的消息.但是其他人可能来自Git hooks .他们的Git或由任何人运行的Git进行设置.他们可以做任何事情.您的Git无法控制它们. 1 如果它们发出奇怪的随机消息,您将看到奇怪的随机消息,并以通常的remote:为前缀.

There's no easy way to tell what any given message means. Some messages—such as enumerating and counting objects—actually come from Git helpers that the other Git has invoked; you see these same messages from your own Git at times. But others may come from Git hooks. Their Git—or whoever runs it—sets these up. They can do anything. Your Git has no control over them.1 If they emit weird random messages, you will see weird random messages, prefixed by the usual remote:.

在这种情况下,可能是GitHub故障.

In this case, it was probably the GitHub glitch.

1 由于受欢迎的需求,Git员工实际上 did 添加了在您身边设置一些控制旋钮的功能,而Git则钩在 other 可以查看和使用.这就是--push-optiongit push的含义.但是,这些似乎在实践中并不经常使用.取决于其他Git的钩子来显式检查和使用任何此类选项-默认情况下,它们始终被完全忽略.

1Due to popular demand, the Git folks actually did add the ability to set some control knobs on your side, that Git hooks on the other side can look at and use. This is what the --push-option to git push is about. These do not seem to be used very often in practice, though. It's up to the other Git's hooks to explicitly check for, and use, any such options—by default they're completely ignored anyway.

这篇关于什么都没有写在远程旁边:在git中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆