Android Studio 不断向 GitHub 添加其他文件 [英] Android Studio keeps adding additional files to GitHub

查看:20
本文介绍了Android Studio 不断向 GitHub 添加其他文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 Android Studio 2.2.2,使用内置的 VCS 工具.出于某种原因,Android Studio 会自动添加一堆我没有添加或编辑的额外 xml 文件和文件夹.

I'm using Android Studio 2.2.2, using the built in VCS tool. For some reason, Android Studio automatically adds a bunch of extra xml files and folders that I did not add nor edit.

更具体地说,当我不希望它添加以下文件时:

More specifically, it's adding the following files when I don't want it to:

/_windows
IntelliLang.xml
debugger.xml
diff.xml
vcs.xml
web-browsers.xml

这使得拉取请求完全不可能,因为主分支没有这些文件,而且我的其他组成员似乎也没有这个问题.

This makes making pull requests downright impossible as the master branch doesn't have these files, and none of my other group members seem to have this problem either.

在删除/配置 Android Studio 以阻止这个讨厌的错误方面有什么帮助吗?

Any help in removing / configuring Android Studio to stop this pesky bug?

--

我已经在使用 gitignore 文件了.奇怪的是,我的附加文件也位于错误的文件夹中.基本上,我的根文件夹有一个用于我的应用程序的子文件夹.由于某种原因,Android Studio 在我的根文件夹中创建了所有垃圾文件.

edit: I am already using a gitignore file already. The weird thing is that my additional files are in the wrong folder too. Basically, my root folder, has a subfolder for my app. All the junk files are created in my root folder for some reason by Android Studio.

/root/
    /_windows
    IntelliLang.xml
    debugger.xml
    diff.xml
    vcs.xml
    web-browsers.xml

    /my_android_app/
                    gitignore for my app
                    /files actually needed for my project

推荐答案

原来这个功能叫做设置存储库",它旨在自动保存 IDE 设置.我想我可能会不小心同意 IDEA 的一些弹出窗口,看起来像是将文件添加到 git 存储库,所以这开始工作了.

Turns out this feature is called "Settings Repository", and it's intended to save IDE settings automatically. I guess I might accidentally agree on some popup from IDEA which look like add files to the git repository, so this started working.

修复:打开首选项 → 工具 → 设置存储库 → 删除.我还禁用了自动同步.不知道如果我删除所有内容,它会保存在哪里,但我将其关闭以更加安全..

FIX: Open Preferences → Tools → Settings Repository → Delete. I also disabled Auto-Sync. Dunno where it's going to save if I delete everything, but I switch it off to be extra safe..

这篇关于Android Studio 不断向 GitHub 添加其他文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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