简体   繁体   English

Git和Android Studio噩梦版本控制

[英]Git and Android Studio nightmare Version Control

Yes i'm new in git, but as far as i can see it's a pain. 是的,我是git的新手,但据我所知这很痛苦。

Assuming that: 假如说:

  • I'm working on Windows 7 64 bit 我正在使用Windows 7 64位
  • Git perfectly installed Git完美安装
  • Using an Assembla repo which i'm currently using with Eclipse and SVN 使用我当前正在使用Eclipse和SVN的Assembla存储库
  • I'm now developing with the absolute latest version of Android Studio (updated just 2 days ago...) 我现在正在使用绝对最新的Android Studio版本进行开发(仅在2天前更新...)

I want to ask here, if is my lack of expertise, or it's simply inferior to SVN (which also gives me a bunch of problems in Android Studio, when in Eclipse i can work like a charm!). 我想在这里问我是否缺乏专业知识,或者它简直不如SVN(这也给我带来了很多Android Studio问题,而在Eclipse中我可以像个魅力一样工作!)。

This is what i've done: - made a project and decide to add to Version Control - went in project dir and get Bash console. 这就是我所做的事情:-创建一个项目并决定添加到Version Control-进入项目目录并获取Bash控制台。 - "git init" and there aren't all the files under git control because of this ignore list (why and how git decides alone that there are things to ignore here, is a mistery, if someone could explain that would be awesome.) - Deleted ".ignoregit" file list and give a "git add ." -“ git init”,由于这个忽略列表,并不是所有文件都在git的控制之下(为什么git以及如何单独决定这里有些东西要忽略,如果有人可以解释那太棒了,那真是个谜。) -删除了“ .ignoregit”文件列表,并提供了“ git add”。 - now it seems everything's under VC but if when i drilled down in project tree i've found for example "build" folder not checked with git sign icon. -现在似乎一切都在VC下,但是如果我在项目树中向下钻取时,例如发现未使用git sign图标检查的“ build”文件夹。

Tried every command like "add -f" and "add *" and such, no way. 尝试过每条命令,例如“ add -f”和“ add *”之类的方法,都没有办法。 Sometimes it seems fooling me around adding something that wasn't added before, but remove something else from the list of versione files! 有时,似乎在愚弄我添加以前未添加的内容,但从versione文件列表中删除了其他内容!

Really really inexplicable. 真的真的莫名其妙。

Thanks 谢谢

If you're going to use git I recommend you go through this quick tutorial http://www.gitimmersion.com . 如果您要使用git,建议您快速浏览一下该快速教程http://www.gitimmersion.com It takes about 2 hours all-in, but you'll have a strong foundation in git when you're done. 全过程大约需要2个小时,但是完成后,您将在git中拥有坚实的基础。

  1. why and how git decides alone that there are things to ignore here 为什么和如何git独自决定这里有些事情要忽略

The gitignore files are not created by git but I asume by Android studio and they do make sense . gitignore文件不是由git创建的,但我认为是由Android studio创建的, 它们确实有意义 You can still decide to delete them. 您仍然可以决定删除它们。

  1. You probably have 2 gitignore files, one in the project folder, one in the app module folder. 您可能有2个gitignore文件,一个在项目文件夹中,一个在应用程序模块文件夹中。 After deleting them both, all files should be added. 将它们都删除后,应添加所有文件。

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

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