Django Can';推送新git分支后找不到本地文件
从目录和主分支的顶部:Django Can';推送新git分支后找不到本地文件,django,git,github,scrapy,Django,Git,Github,Scrapy,从目录和主分支的顶部: 将目录中的文件选择添加到git:`git add file1.py file2.py file3.py file4.py file5.py git status显示所有已成功添加 git commit显示创建了3个文件,这是有意义的,因为2个文件已修改,3个文件是新的 > git commit -m 'viewervalidation' [master f73f0bc] viewervalidation 5 files changed, 289 insertion
git status
显示所有已成功添加> git commit -m 'viewervalidation'
[master f73f0bc] viewervalidation
5 files changed, 289 insertions(+), 6 deletions(-)
create mode 100644 viewervalidation/file1.py
create mode 100644 viewervalidation/file2.py
create mode 100644 viewervalidation/file3.py
> git push origin master
To github.com:groupflix/data-science.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'git@github.com:xxx.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
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.
> git checkout -b 'vv_exp1'
M general_scripts/data_munging/neo4j_query.py
D general_scripts/data_munging/remove_bad_users.py
M nlp_api/summarizer/classes/review.py
M nlp_api/summarizer/modeling/pull_openend_sentiment_dataset.py
Switched to a new branch 'vv_exp1'
> git push origin 'vv_exp1'
Counting objects: 749, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (722/722), done.
Writing objects: 100% (749/749), 833.12 KiB | 0 bytes/s, done.
Total 749 (delta 374), reused 3 (delta 0)
remote: Resolving deltas: 100% (374/374), done.
To github.com:groupflix/data-science.git
* [new branch] vv_exp1 -> vv_exp1
scrapy crawl NameSearch-a filename=12.csv
产生以下结果:
Scrapy 1.0.3 - no active project
Unknown command: crawl
Use "scrapy" to see available commands
git branch -a
git remote show origin
第一个命令将列出所有分支。第二个命令获取远程分支。尝试:
吉特拉力
在你推到原点之前。我发现了问题所在,我使用稀疏签出只拉取部分回购,但是我的稀疏签出文件还没有包括我试图拉取的viewervalidation目录。当我添加文件路径时,它解决了问题。感谢您的回复!我发现了问题所在-viewervalidation不在我的稀疏签出文件中(我忘了我一直在使用该文件)