我有一个大项目(让我们说A repo),它有一个来自的子文件夹B repo.当我承诺时,我会像下面那样遇到警告A repo
warning: adding embedded git repository: extractor/annotator-server
hint: You've added another git repository inside your current repository.
hint: Clones of the outer repository will not contain the contents of
hint: the embedded repository and will not know how to obtain it.
hint: If you meant to add a submodule, use:
hint:
hint: git submodule add <url> extractor/annotator-server
hint:
hint: If you added this path by mistake, you can remove it from the …Run Code Online (Sandbox Code Playgroud) 该__pycache__目录在使用 git 更新时很烦人。每当我使用 时git status,都会出现很多 .pyc 文件。如何方便地列出__pycache__文件中的文件夹,.gitignore以便在使用时不显示git status?
例如:
core/__pycache__/utils.cpython-36.pyc
core/__pycache__/version.cpython-36.pyc
core/actions/__pycache__/__init__.cpython-36.pyc
core/actions/__pycache__/action.cpython-36.pyc
Run Code Online (Sandbox Code Playgroud)
我是否必须将所有单个__pycache__文件都列出到 gitignore 文件中?
我正在寻找排除文件格式版本.我看到文件中的"添加"到vcs按钮,但我没有像eclipse中那样找到"未跟踪"或"忽略"按钮.我试图排除文件夹.idea /.我厌倦了编辑gitignore manualy和忽略文件按钮,但没有任何作用.有任何想法吗 ?
谢谢托马斯
我早期跟踪了很多文件,但是我不希望git从现在起再跟踪它们.
我可以根据.gitignore文件解开这些文件吗?
编辑
文件太多而且它们在许多不同的目录中分开,因此逐个删除它们是不切实际的,相反,我希望它们可以根据.gitignore文件中的模式进行不跟踪.
在这种情况下,我想忽略iOS使用的文件,特别是这个文件
.DS_Store
Run Code Online (Sandbox Code Playgroud)
我这样创建了一个.gitignore文件
touch .gitignore
Run Code Online (Sandbox Code Playgroud)
并放在一行
/.DS_Store
Run Code Online (Sandbox Code Playgroud)
我推到一个裸露的仓库,有一个钩子结账到一个完整的回购.
该文件一直显示在我的完整仓库中.
我正在尝试以下内容:
#DNX
project.lock.json
Run Code Online (Sandbox Code Playgroud)
和
*.lock.json
Run Code Online (Sandbox Code Playgroud)
但似乎并没有忽略这些文件.
我使用的是遇到问题.gitignore与我.vscode在我的库文件夹中。
我在 my 添加了一条规则.gitignore来忽略我的整个.vscode/文件夹:
# Visual Studio Code #
.vscode/*
.vscode/settings.json
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history.vscode/settings.json
Run Code Online (Sandbox Code Playgroud)
尽管如此,.vscode我的本地 git 存储库仍在跟踪。我尝试了各种不同的解决方案,包括使用git filter-branch从我的 git 历史记录中删除这个文件夹并git rm --cached .vscode清除我的缓存并重新提交我的更改,但这些解决方案都没有阻止 .vscode 文件夹被 git 跟踪。
当我跑步时,git status我不断得到这个结果:
# Visual Studio Code #
.vscode/*
.vscode/settings.json
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history.vscode/settings.json
Run Code Online (Sandbox Code Playgroud)
到目前为止,我已经通过在git add更改时手动排除此文件夹来解决此问题。
为什么.vscode/仍然显示为未跟踪?如果我要git add .和git commit这一点,那就该文件夹时,添加到我的git的历史,最终我的远程存储库我git push。我不希望这种行为发生。
我有一个大型(ish)项目[90个文件650kb代码],我现在在Git中管理.我有一些独立的测试工具用于尝试/测试新的低级别计算位,这些位稍后合并到主代码及其分支中(目前通过复制粘贴!).
管理测试线束的推荐最佳实践是什么?
它们应该在一个单独的存储库中,还是应该在主仓库中创建一个空分支来启动它,或者只是创建一个"Test Harness"分支并覆盖旧代码?
希望的好处是主分支中的测试代码将与测试的代码明显"相同".
我在Windows(msysgit)上,我是在公司中使用Git的'探险家'.
我有一些文件曾经在 git 存储库中,但后来被忽略了。(主要是配置文件)但是,当我运行时git reset --hard,这些忽略文件上的更改也会重置,我确信 head 版本已经忽略了这些文件。
这是正常的吗?有没有办法git reset --hard忽略被忽略文件的更改?
我正在我的网站上运行 Vercel 编译,但无法消除导出时的预渲染错误。有谁知道发生这种情况的原因并可以帮助我解决这个问题?我的 github 包含所有代码:https://github.com/M0rilla/MyProfile
每个页面都有一个错误,如上所述:
Error occurred prerendering page "/resume". Read more: https://nextjs.org/docs/messages/prerender-error
Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
Error: Export encountered errors on following paths:
21:20:09.541 /
21:20:09.541 /404
21:20:09.541 /500
21:20:09.541 /experiences
21:20:09.542 /resume
21:20:09.542 /skills
Run Code Online (Sandbox Code Playgroud)
我没有自定义 404 或 500 页面。