首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >react-native-git-upgrade错误:致命:未指定远程存储库

react-native-git-upgrade错误:致命:未指定远程存储库
EN

Stack Overflow用户
提问于 2017-09-29 04:16:25
回答 1查看 405关注 0票数 3

我在尝试使用react-native-git-upgrade进行升级时遇到了问题。第一个问题与https://github.com/facebook/react-native/issues/11578相同。

不幸的是,那个线程上的解决方案都没有帮到我。

所以,我试着清理纱线缓存。我运行yarn cache clean

当我再次尝试运行react-native-git-upgrade时,出现以下错误:

E:\ReactProject\Aurai>react-native-git-upgrade

代码语言:javascript
复制
git-upgrade info Check for updates
git-upgrade info Using yarn 0.24.5
git-upgrade info Read package.json files
git-upgrade info Check declared version
git-upgrade info Check matching versions
git-upgrade info Check React peer dependency
git-upgrade info Check that Git is installed
git-upgrade info Get information from NPM registry
git-upgrade info Upgrading to React Native 0.48.4, React 16.0.0-alpha.12
git-upgrade info Setup temporary working directory
git-upgrade info Configure Git environment
git-upgrade info Init Git repository
git-upgrade info Add all files to commit
warning: LF will be replaced by CRLF in .babelrc.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .buckconfig.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .flowconfig.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .gitattributes.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in __tests__/index.android.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in __tests__/index.ios.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/app/proguard-rules.pro.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/app/src/main/assets/index.android.bundle.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/app/src/main/java/com/auraiid/id/MainActivity.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/app/src/main/java/com/auraiid/id/MainApplication.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/gradle/wrapper/gradle-wrapper.properties.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/gradlew.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/keystores/BUCK.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/keystores/debug.keystore.properties.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in app.json.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in index.android.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in index.ios.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId-tvOS/Info.plist.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId-tvOSTests/Info.plist.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId.xcodeproj/xcshareddata/xcschemes/AuraiId-tvOS.xcscheme.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId.xcodeproj/xcshareddata/xcschemes/AuraiId.xcscheme.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId/AppDelegate.h.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId/Base.lproj/LaunchScreen.xib.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId/Images.xcassets/AppIcon.appiconset/Contents.json.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId/main.m.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiIdTests/AuraiIdTests.m.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiIdTests/Info.plist.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Badge.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Button.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Card.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/CardItem.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/CheckBox.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Container.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Content.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Fab.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Footer.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/FooterTab.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Form.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/H1.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/H2.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/H3.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Header.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Icon.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Input.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/InputGroup.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Item.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Label.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/ListItem.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Picker.android.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Picker.ios.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Radio.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Segment.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Separator.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Spinner.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Tab.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/TabBar.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/TabContainer.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/TabHeading.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Text.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Textarea.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Title.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/Toast.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/View.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/components/index.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/variables/commonColor.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/variables/material.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in native-base-theme/variables/platform.js.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in package.json.
The file will have its original line endings in your working directory.
git-upgrade info Commit current project sources
git-upgrade info Create a tag before updating sources
git-upgrade info Generate old version template
git-upgrade info Add updated files to commit
warning: LF will be replaced by CRLF in .babelrc.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .buckconfig.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .flowconfig.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .gitattributes.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/app/BUCK.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/app/build.gradle.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/app/proguard-rules.pro.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/app/src/main/AndroidManifest.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/app/src/main/res/values/strings.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/app/src/main/res/values/styles.xml.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/build.gradle.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/gradle.properties.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/gradle/wrapper/gradle-wrapper.properties.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/gradlew.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/keystores/BUCK.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/keystores/debug.keystore.properties.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/settings.gradle.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in app.json.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId-tvOS/Info.plist.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId-tvOSTests/Info.plist.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId.xcodeproj/xcshareddata/xcschemes/AuraiId-tvOS.xcscheme.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId.xcodeproj/xcshareddata/xcschemes/AuraiId.xcscheme.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId/AppDelegate.h.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId/AppDelegate.m.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId/Base.lproj/LaunchScreen.xib.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId/Images.xcassets/AppIcon.appiconset/Contents.json.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId/Info.plist.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiId/main.m.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiIdTests/AuraiIdTests.m.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in ios/AuraiIdTests/Info.plist.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/app/src/main/java/com/auraiid/MainActivity.java.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in android/app/src/main/java/com/auraiid/MainApplication.java.
The file will have its original line endings in your working directory.
git-upgrade info Commit old version template
git-upgrade info Install the new version
error Command failed.
Exit code: 1
Command: git
Arguments: pull
Directory: C:\Users\Ando\AppData\Local\Yarn\cache\v1\.tmp\a3450fedabcb67009ae55c8f322f57b0
Output:
fatal: No remote repository specified.  Please, specify either a URL or a
remote name from which new revisions should be fetched.
git-upgrade ERR! An error occurred during upgrade:
git-upgrade ERR! Error: Command 'yarn add react-native@0.48.4 react@16.0.0-alpha.12' exited with code 1:
stderr: undefinederror Command failed.
Exit code: 1
Command: git
Arguments: pull
Directory: C:\Users\Ando\AppData\Local\Yarn\cache\v1\.tmp\a3450fedabcb67009ae55c8f322f57b0
Output:
fatal: No remote repository specified.  Please, specify either a URL or a
remote name from which new revisions should be fetched.

stdout: yarn add v0.24.5
[1/4] Resolving packages...
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command.

    at ChildProcess.child.on.code (C:/Users/Ando/AppData/Roaming/npm/node_modules/react-native-git-upgrade/cliEntry.js:58:18)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
git-upgrade ERR! Restore initial sources
Note: checking out 'project-snapshot'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at adaaa8d... Project snapshot

我该怎么办?

我当前的React Native : 0.44.0

git版本2.13.1.windows.2

Yarn版本0.24.5

EN

回答 1

Stack Overflow用户

发布于 2021-10-05 18:32:17

在我的情况下,我有一个服务器文件夹为我的后端,我意外地创建了一个git初始化或初始git存储库,然后我试图推送代码在我的主文件夹或根文件夹,因为该服务器文件夹的git存储库,我的主/根文件夹给我错误,如“该文件有工作目录和LF将被替换为CRLF”等,所以我只是删除了git repo或.git从根文件夹和服务器文件夹,然后重试,这次它工作。

检查你的文件夹,看看是否有git repo init,或者你有没有在像me xD这样的文件夹上运行git init代码。如果要完全删除git存储库,请使用以下命令:

rm -rf .git (-rf将强制删除git存储库)

尝试此操作,然后推送或升级git...

我希望这对你有帮助。:)

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46477595

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档