简体   繁体   English

跨平台的Android Studio Git

[英]Android Studio git across platforms

I have 3 computers currently, Desktop, Laptop and Tablet. 我目前有3台计算机,台式机,笔记本电脑和平板电脑。 The two first ones is running Linux, but the tablet is a newer Intel BayTrail with no Linux support at the moment, so I am running Windows 10 on it for now. 前两个是运行Linux,但平板电脑是较新的Intel BayTrail,目前不支持Linux,因此我现在在其上运行Windows 10。

All 3 devices is setup with my development environment auto synced using Dropbox. 使用Dropbox自动同步我的开发环境来设置所有3种设备。 Each project is setup with git for Github storage, not handled by Android Studio, I only use git from the Linux devices via terminal. 每个项目都使用git进行Github存储设置,而不是由Android Studio处理,我仅通过终端从Linux设备使用git。

My problem is that whenever I use Android Studio on the Windows 10 Tablet and return to one of my Linux devices, I get the following error when I try to use any git command. 我的问题是,每当我在Windows 10 Tablet上使用Android Studio并返回到我的Linux设备之一时,尝试使用任何git命令时都会出现以下错误。

fatal: Not a git repository (or any parent up to mount parent /media/Storage) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set) 致命:不是git存储库(或任何要挂载父级/ media / Storage的父级)在文件系统边界停止(未设置GIT_DISCOVERY_ACROSS_FILESYSTEM)

I tried ones to run git init , but that put my entire history back to my Initial Commit . 我试过运行git init ,但这使我的整个历史回到了Initial Commit

Is there any way to get Android Studio to stop touching my .git directory, cause it is messing them up when working between Windows and Linux. 有没有办法让Android Studio停止触摸我的.git目录,原因是在Windows和Linux之间工作时,它们弄乱了他们。 Also if this happens again, how can I fix git without breaking my history? 另外,如果再次发生这种情况,如何在不破坏历史记录的情况下修复git?

The solution is apparently simple. 解决方案显然很简单。 Just disable all plugins related to Version Control. 只需禁用与版本控制相关的所有插件即可。 No need to have Android Studio mess with git files when you use a terminal for that. 使用终端时,无需将Android Studio与git文件混为一谈。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM