简体   繁体   English

git 错误:“致命:不是有效的修订版”

[英]git error: “fatal: not a valid revision”

I am collaborating on a repository where they upload translations of JS documentation.我正在合作一个存储库,他们在那里上传 JS 文档的翻译。 I translated a new file and I want to add it to such repository.我翻译了一个新文件,我想将它添加到这样的存储库中。 The owners told me to do a pull request: that I should create a fork, create a branch, commit my translation and then make the pull request.所有者告诉我做一个拉取请求:我应该创建一个分支,创建一个分支,提交我的翻译,然后发出拉取请求。

I've done all those things but I get the mistake "fatal: not a valid revision".我已经完成了所有这些事情,但我得到了“致命的:不是有效的修订版”的错误。 I understand I must be missing the version number but since I am just uploading a new documentation, I do not know how that can be possible.我知道我一定缺少版本号,但由于我只是上传新文档,我不知道这怎么可能。 This is what I have written in git bash so far to no avail:这是我迄今为止在 git bash 中写的无济于事的内容:

git add ES6.md

That's my translation.这是我的翻译。

git commit -m "new translation"

git request-pull -p "destructuring es6" <repo URL>

I think I'm missing the :master at the end but I'm not sure if I should use it.我想我最后错过了 :master 但我不确定是否应该使用它。 This is the error message I get:这是我收到的错误消息:

fatal: not a valid revision: destructuring es6

The owners from the repository asked me to do through GitHub, so I followed all those steps they told me but on GitHub.存储库的所有者要求我通过 GitHub 完成,所以我按照他们告诉我的所有步骤进行,但在 GitHub 上。

I wanted to test my git knowledge but I didn't know people make pull requests through the website.我想测试我的 git 知识,但我不知道人们通过网站提出拉取请求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM