Git + Pycharm, push rejected error, files all gone
Git + Pycharm, push rejected error, files all gone
我是使用Pycharm的新手程序员。
有一个功能让我能够连接我的 Pycharm 和 GitHub 存储库。
我不知道 Git 是如何工作的,我想上传(推送?)我的代码和文件到 GitHub:它问我是否要合并,我说是。
然后弹出错误信息:
Push rejected. Push was rejected, and update failed with an error
我的文件都没有了,没有推送+我找不到它的日志。
git 日志:HEAD
我想恢复我的代码和飞T_T
他们的名字是“crawl.py
”、“cos_similarity.py
”、“word_processor.py
”、“nouns_compare.py
”、“test.xlsx
”和“eta_assistant_results.txt
” '
git按钮在Pycharm
右上角
我点击了绿色箭头,
我收到了这条消息,
然后我点击了 'merge' 按钮
在 git 控制台中,它说...
10:09:22.261: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/crawl.py
10:33:46.504: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/cos_similarity.py
10:49:21.180: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/word_processor.py
11:09:36.143: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/nouns_compare.py
12:37:25.049: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/test.xlsx
13:42:23.357: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/~$eta_assistant_results.xlsx
**error: open("crawler/~$eta_assistant_results.xlsx"): Permission denied
error: unable to index file
'crawler/~$eta_assistant_results.xlsx'**
open("crawler/~$eta_assistant_results.xlsx"): Permission denied
unable to index file 'crawler/~$eta_assistant_results.xlsx'
13:43:54.294: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/eta_assistant_results.xlsx.rsmbk
**error: open("crawler/eta_assistant_results.xlsx.rsmbk"): Permission denied
error: unable to index file 'crawler/eta_assistant_results.xlsx.rsmbk'**
open("crawler/eta_assistant_results.xlsx.rsmbk"): Permission denied
unable to index file 'crawler/eta_assistant_results.xlsx.rsmbk'
15:40:07.371: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/main:main
**error: failed to push some refs to 'https://github.com/SongJongbeen/chatbot.git'
hint: Updates were rejected because the remote contains work that you do**
To https://github.com/SongJongbeen/chatbot.git
! refs/heads/main:refs/heads/main [rejected] (fetch first)
**hint: not have locally. This is usually caused by another repository pushing**
Done
**hint: to the same ref. You may want to first integrate the remote changes**
**hint: (e.g., 'git pull ...') before pushing again.**
**hint: See the 'Note about fast-forwards' in 'git push --help' for details.**
15:40:12.691: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false fetch origin --recurse-submodules=no --progress --prune
**remote: Enumerating objects: 6, done.
remote: Counting objects: 25% (1/4)
remote: Counting objects: 50% (2/4)
remote: Counting objects: 75% (3/4)
remote: Counting objects: 100% (4/4)
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 33% (1/3)
remote: Compressing objects: 66% (2/3)
remote: Compressing objects: 100% (3/3)
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 1), reused 1 (delta 1), pack-reused 2
From https://github.com/SongJongbeen/chatbot
71d62fe..733d1d4 main -> origin/main**
15:40:14.844: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false restore --staged --worktree --source=HEAD -- crawler/crawl.py crawler/crawler.py crawler/nouns_compare.py crawler/test.xlsx crawler/cos_similarity.py crawler/word_processor.py
15:40:15.060: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false merge origin/main --no-stat -v
**error: The following untracked working tree files would be overwritten by merge:**
**.idea/.name**
**.idea/workspace.xml**
**Please move or remove them before you merge.**
**Aborting**
I didn't know how git works, and I wanted to upload (push?) my codes and files to github. It asked me if I want to merge, and I said yes.
当您创建一个新的 GitHub 存储库时会发生这种情况...使用 README、and/or LICENSE 等文件进行初始化。
再试一次,但这次使用 GitHub 全新的 和 空库:从 [=23= 推送时应该没有“合并”问题].
检查 PyCharm local history 是否可以通过这种方式恢复文件:在新文件夹中重新创建它们,然后从那里重试所有过程。
我是使用Pycharm的新手程序员。
有一个功能让我能够连接我的 Pycharm 和 GitHub 存储库。
我不知道 Git 是如何工作的,我想上传(推送?)我的代码和文件到 GitHub:它问我是否要合并,我说是。
然后弹出错误信息:
Push rejected. Push was rejected, and update failed with an error
我的文件都没有了,没有推送+我找不到它的日志。
git 日志:HEAD
我想恢复我的代码和飞T_T
他们的名字是“crawl.py
”、“cos_similarity.py
”、“word_processor.py
”、“nouns_compare.py
”、“test.xlsx
”和“eta_assistant_results.txt
” '
git按钮在Pycharm
右上角我点击了绿色箭头,
我收到了这条消息,
然后我点击了 'merge' 按钮
在 git 控制台中,它说...
10:09:22.261: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/crawl.py
10:33:46.504: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/cos_similarity.py
10:49:21.180: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/word_processor.py
11:09:36.143: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/nouns_compare.py
12:37:25.049: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/test.xlsx
13:42:23.357: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/~$eta_assistant_results.xlsx
**error: open("crawler/~$eta_assistant_results.xlsx"): Permission denied
error: unable to index file
'crawler/~$eta_assistant_results.xlsx'**
open("crawler/~$eta_assistant_results.xlsx"): Permission denied
unable to index file 'crawler/~$eta_assistant_results.xlsx'
13:43:54.294: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false add --ignore-errors -A -- crawler/eta_assistant_results.xlsx.rsmbk
**error: open("crawler/eta_assistant_results.xlsx.rsmbk"): Permission denied
error: unable to index file 'crawler/eta_assistant_results.xlsx.rsmbk'**
open("crawler/eta_assistant_results.xlsx.rsmbk"): Permission denied
unable to index file 'crawler/eta_assistant_results.xlsx.rsmbk'
15:40:07.371: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false push --progress --porcelain origin refs/heads/main:main
**error: failed to push some refs to 'https://github.com/SongJongbeen/chatbot.git'
hint: Updates were rejected because the remote contains work that you do**
To https://github.com/SongJongbeen/chatbot.git
! refs/heads/main:refs/heads/main [rejected] (fetch first)
**hint: not have locally. This is usually caused by another repository pushing**
Done
**hint: to the same ref. You may want to first integrate the remote changes**
**hint: (e.g., 'git pull ...') before pushing again.**
**hint: See the 'Note about fast-forwards' in 'git push --help' for details.**
15:40:12.691: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false fetch origin --recurse-submodules=no --progress --prune
**remote: Enumerating objects: 6, done.
remote: Counting objects: 25% (1/4)
remote: Counting objects: 50% (2/4)
remote: Counting objects: 75% (3/4)
remote: Counting objects: 100% (4/4)
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 33% (1/3)
remote: Compressing objects: 66% (2/3)
remote: Compressing objects: 100% (3/3)
remote: Compressing objects: 100% (3/3), done.
remote: Total 6 (delta 1), reused 1 (delta 1), pack-reused 2
From https://github.com/SongJongbeen/chatbot
71d62fe..733d1d4 main -> origin/main**
15:40:14.844: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false restore --staged --worktree --source=HEAD -- crawler/crawl.py crawler/crawler.py crawler/nouns_compare.py crawler/test.xlsx crawler/cos_similarity.py crawler/word_processor.py
15:40:15.060: [chatbot-master] git -c credential.helper= -c core.quotepath=false -c log.showSignature=false merge origin/main --no-stat -v
**error: The following untracked working tree files would be overwritten by merge:**
**.idea/.name**
**.idea/workspace.xml**
**Please move or remove them before you merge.**
**Aborting**
I didn't know how git works, and I wanted to upload (push?) my codes and files to github. It asked me if I want to merge, and I said yes.
当您创建一个新的 GitHub 存储库时会发生这种情况...使用 README、and/or LICENSE 等文件进行初始化。
再试一次,但这次使用 GitHub 全新的 和 空库:从 [=23= 推送时应该没有“合并”问题].
检查 PyCharm local history 是否可以通过这种方式恢复文件:在新文件夹中重新创建它们,然后从那里重试所有过程。