Git无法锁定参考,无法创建参考

时间:2018-08-31 23:24:29

标签: git git-checkout

我收到此错误:

fatal: cannot lock ref 'refs/heads/oleg/feature/1535693040/squashed':
     

'refs / heads / oleg / feature / 1535693040'存在;不能创造   'refs / heads / oleg / feature / 1535693040 / squashed'

产生错误的脚本是:

current_branch="$(git rev-parse --abbrev-ref HEAD)"

git checkout -b "$current_branch/squashed"
git reset --soft "remotes/origin/dev";

git add .
git add -A
git commit -am "ores/gitflow auto-commit (squashed)"
git push

有人知道那是什么吗?

1 个答案:

答案 0 :(得分:2)

啊,我找到了答案: https://stackoverflow.com/a/22630664/1223975

简而言之,如果存在:a/b/c,则Git无法创建a/b/c/d

不确定为什么