首次推送到 github repo 生成 765 个未跟踪或修改的文件 [英] First push to github repo generated 765 untracked or modified files

查看:24
本文介绍了首次推送到 github repo 生成 765 个未跟踪或修改的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我第一次尝试从左下角的 vscode 按钮推送和创建新存储库.完成后,我对 765 个文件感到震惊.他们中的大多数人都没有被追踪.我不知道这些文件是什么以及它们来自哪里.有 R.java 文件.gitignore 文件被擦除(我认为),构建文件夹,.flutter-plugins 被添加.这样做安全吗?

This is the first time I tried to push and create new repository from vscode button at the bottom left. Once that was done, I was shocked to 765 files. Most of them were untracked. I don't know what these files are and where did they come from. There's R.java files. The gitignore file was wiped (I think), the build folder, .flutter-plugins are added. Is this safe to do?

gitignore 的变化特别让我担心.

the gitignore changes specifically made me worry.

git 状态输出:

推荐答案

似乎 git 存储库中未编入索引的大部分文件都来自 /build/ 文件夹.编译项目时,编译后的文件和完成的应用程序都存储在这里.它们不应包含在 git 存储库中.

It seems that most of the files not indexed in the git repository are from the /build/ folder. When you compile your project, the compiled files and finished apps are stored here. They should not be included in the git repo.

我怀疑由于对 .gitignore 文件的更改,您现在将看到所有这些文件.可能是您的某些 .gitignore 文件被意外删除了.我的文件有 74 行,而你的似乎只有 44 行.

I suspect that because of the changes to your .gitignore file, you will now see all of these files. It could be that some of your .gitignore file was accidentally deleted. My file is 74 lines long and yours seems to be only 44 lines long.

这必须是默认文件,这会使未编入索引的文件再次消失:

This would have to be the default file, which would make the unindexed files disappear again:

# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.packages
.pub-cache/
.pub/
/build/

# Android related
**/android/**/gradle-wrapper.jar
**/android/.gradle
**/android/captures/
**/android/gradlew
**/android/gradlew.bat
**/android/local.properties
**/android/**/GeneratedPluginRegistrant.java

# iOS/XCode related
**/ios/**/*.mode1v3
**/ios/**/*.mode2v3
**/ios/**/*.moved-aside
**/ios/**/*.pbxuser
**/ios/**/*.perspectivev3
**/ios/**/*sync/
**/ios/**/.sconsign.dblite
**/ios/**/.tags*
**/ios/**/.vagrant/
**/ios/**/DerivedData/
**/ios/**/Icon?
**/ios/**/Pods/
**/ios/**/.symlinks/
**/ios/**/profile
**/ios/**/xcuserdata
**/ios/.generated/
**/ios/Flutter/App.framework
**/ios/Flutter/Flutter.framework
**/ios/Flutter/Generated.xcconfig
**/ios/Flutter/app.flx
**/ios/Flutter/app.zip
**/ios/Flutter/flutter_assets/
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*

# Exceptions to above rules.
!**/ios/**/default.mode1v3
!**/ios/**/default.mode2v3
!**/ios/**/default.pbxuser
!**/ios/**/default.perspectivev3
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
.flutter-plugins-dependencies

这篇关于首次推送到 github repo 生成 765 个未跟踪或修改的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆