无法看到推入的提交 Pycharm
Can not see the commits for pushing in Pycharm
我已经做了一些提交,但我看不到它们用于推送。
我读到这可能与没有遥控器有关?但这里是命令行的结果:
$ git remote
origin
更新:
git状态命令结果:
git status
HEAD detached from 5235085
Untracked files:
(use "git add <file>..." to include in what will be committed)
.idea/
Connect4Py/__pycache__/
nothing added to commit but untracked files present (use "git add" to track)
git branch -avv 命令结果:
git branch -avv
* (HEAD detached from 5235085) 908eb97 Fix: - New camera OpenCV configurations - Improved the Yellow and Red Ball detections. - Improved the Matrix placement of the balls.
main 6dc0b73 [origin/main] Fix: bug fixes
temp 1e084c0 Fix: - New camera OpenCV configurations - Improved the Yellow and Red Ball detections. - Improved the Matrix placement of the balls.
remotes/origin/HEAD -> origin/main
remotes/origin/main 6dc0b73 Fix: bug fixes
注意:fix: bug fixes
提交不是我做的,那是另一个用户,他的提交推送命令成功了。
仍然在命令行中,检查输出是否 git status
如果您处于分离 HEAD 模式(不在分支中),请检查您的本地和远程分支 (git branch -avv
),看看您应该在哪个分支上。
然后你可以 switch to the right branch, and merge your detached HEAD.
git switch -c tmp
git switch main
git merge tmp
git branch -d tmp
老 Git:
git checkout -b tmp
git checkout main
git merge tmp
git branch -d tmp
从那里,您将能够推送,包括从 PyCharm。
我已经做了一些提交,但我看不到它们用于推送。
我读到这可能与没有遥控器有关?但这里是命令行的结果:
$ git remote
origin
更新:
git状态命令结果:
git status
HEAD detached from 5235085
Untracked files:
(use "git add <file>..." to include in what will be committed)
.idea/
Connect4Py/__pycache__/
nothing added to commit but untracked files present (use "git add" to track)
git branch -avv 命令结果:
git branch -avv
* (HEAD detached from 5235085) 908eb97 Fix: - New camera OpenCV configurations - Improved the Yellow and Red Ball detections. - Improved the Matrix placement of the balls.
main 6dc0b73 [origin/main] Fix: bug fixes
temp 1e084c0 Fix: - New camera OpenCV configurations - Improved the Yellow and Red Ball detections. - Improved the Matrix placement of the balls.
remotes/origin/HEAD -> origin/main
remotes/origin/main 6dc0b73 Fix: bug fixes
注意:fix: bug fixes
提交不是我做的,那是另一个用户,他的提交推送命令成功了。
仍然在命令行中,检查输出是否 git status
如果您处于分离 HEAD 模式(不在分支中),请检查您的本地和远程分支 (git branch -avv
),看看您应该在哪个分支上。
然后你可以 switch to the right branch, and merge your detached HEAD.
git switch -c tmp
git switch main
git merge tmp
git branch -d tmp
老 Git:
git checkout -b tmp
git checkout main
git merge tmp
git branch -d tmp
从那里,您将能够推送,包括从 PyCharm。