gpt4 book ai didi

git - 无法锁定引用 'refs/remotes/origin/master'

转载 作者:行者123 更新时间:2023-12-03 15:53:13 29 4
gpt4 key购买 nike

我总是收到 cannot lock ref 'refs/remotes/origin/master'当我执行 git pull第一次,如果有一些更新。

完整的控制台日志如下。

D:\code\react-native\expo-multi-screen-starter>git pull
error: cannot lock ref 'refs/remotes/origin/master': is at b2459b4d5af42622cba55f9fe47ccd14fbd879bc but expected 76f11048c866cfe3e6570eaacf90db3cb7732723
From github.com:liudonghua123/expo-multi-screen-starter
! 76f1104..b2459b4 master -> origin/master (unable to update local ref)

D:\code\react-native\expo-multi-screen-starter>git pull
App.js | 19 ++++-----
src/navigation/AuthStack.js | 14 +++++++
src/navigation/RootNavigator.js | 22 ++++++++++
src/navigation/TabNavigator.js | 4 +-
src/screens/AuthLoadingScreen.js | 35 ++++++++++++++++
src/screens/HomeScreen.js | 19 +++++++++
src/screens/{LoginScreen.js => SignInScreen.js} | 54 ++++++++++++++++++++++---
7 files changed, 147 insertions(+), 20 deletions(-)
create mode 100644 src/navigation/AuthStack.js
create mode 100644 src/navigation/RootNavigator.js
create mode 100644 src/screens/AuthLoadingScreen.js
rename src/screens/{LoginScreen.js => SignInScreen.js} (61%)

D:\code\react-native\expo-multi-screen-starter>

最佳答案

您需要在 Git bash 上使用以下 Git 命令更新引用:

$ git update-ref -d refs/remotes/origin/[locked branch name]

然后使用 $git pull pull
[locked branch name]是由于提交 ID 不匹配而发生错误的分支的名称。

关于git - 无法锁定引用 'refs/remotes/origin/master',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58126421/

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