我的VSCode有一个问题,当我想撤消上次提交时,弹出消息是“无法撤消,因为HEAD没有指向任何提交”。
但我已经提交了,并且在shell中手动完成了工作。
"output“窗口中的上次日志:
> git status -z -u
> git symbolic-ref --short HEAD
> git for-each-ref --format=%(refname)%00%(upstream:short)%00%(upstream:track)%00%(objectname) refs/heads/master refs/remotes/master
fatal: unknown upstream: format track
git状态:
[DEV - -@- -]$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
# (use "git push" to publish your local commits)
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: ---
# modified: ---
# modified: ---
# modified: ---
#
no changes added to commit (use "git add" and/or "git commit -a")
图片VSCode:As you can see, when I commit in VSCode, the synchronize button doesn't show changes
你能帮我修一下git吗?
发布于 2021-02-17 17:15:48
我对自己说,我有git 1.x。我切换到Git2.x,我所有的问题都消失了,奇怪的是VSCode没有警告Git1.x有潜在的bug
https://stackoverflow.com/questions/66245658
复制