git 在 android studio 中试用 CVS 后,我的 Android 项目现在变成了红色
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19264884/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
My Android Project has are now Colored Red after Experimenting with CVS in android studio
提问by The One
I am studying with the CVS in Android Studio and after that, my folder and all files are now color red. How can I make it back to normal again? Please check the link of the picture and see it.
我正在 Android Studio 中使用 CVS 学习,之后,我的文件夹和所有文件现在都是红色。我怎样才能让它再次恢复正常?请检查图片的链接并查看。
http://imageshack.com/a/img199/8914/3sws.png
http://imageshack.com/a/img199/8914/3sws.png
After further checking, probably this is the cause? I'm not sure if this error message means that it is succesfful.
进一步检查后,大概是这个原因?我不确定这个错误信息是否意味着它是成功的。
http://img11.imageshack.us/img11/6766/btac.png
http://img11.imageshack.us/img11/6766/btac.png
This is my git (Git Release Notes (Git-1.8.4-preview20130916) I got this from this website. http://msysgit.github.io/
这是我的git(GIT版本说明(GIT-1.8.4-preview20130916)我得到这个从这个网站。 http://msysgit.github.io/
Thanks, Tok
谢谢,托克
回答by BENARD Patrick
I don't know your programming environment, but in mine, with Git (CLI)
我不知道你的编程环境,但在我的,使用 Git (CLI)
my project files who changed (!= repository) are colored in red when no commit action have been executed.
- this files become green after the commit action.
当没有执行提交操作时,我更改的项目文件(!= 存储库)显示为红色。
- 提交操作后,此文件变为绿色。
It's just an idea but your should try to commit your changes OR cancel (checkout) them.
这只是一个想法,但您应该尝试提交更改或取消(签出)它们。
回答by RileyManda
Switch to project viewin android studio,with project selected, right click>>>git>>>>then add
切换到android studio中的项目视图,选中项目, 右键点击>>> git>>>>然后添加
wait for a few seconds and your files will change color.Provided you have already done your push that is and properly configured your git setup as follows: Github/Bitbucket:
等待几秒钟,您的文件将更改颜色。前提是您已经完成了推送并正确配置了您的 git 设置,如下所示: Github/Bitbucket:
**1.create repository
**1.创建存储库
2.go to androidstudio:vcs::add version control
2.进入androidstudio:vcs::add version control
3.in android terminal:git init
3.在安卓终端:git init
4.git add --all>>>git remote add origin https:\yourrepo url
4.git add --all>>>git remote add origin https:\yourrepo url
5.git commit -m "initial commit"
5.git commit -m "初始提交"
6.git push -u origin master(or whatever branch you created)refresh(github/bitbucket page)
6.git push -u origin master(或者你创建的任何分支)refresh(github/bitbucket page)
回答by joseph sarz
Change your android project from android view to project view
将您的 android 项目从 android 视图更改为项目视图
Make sure you clicked on your project folder
On your toolbar
1. Click on VCS
2. Click on Git
3. Click on Add
确保您单击了您的项目文件夹 在您的工具栏上 1. 单击 VCS
2. 单击 Git
3. 单击添加
All your project files would be added to git
您所有的项目文件都将添加到 git
回答by Winson
I had the same problem a month ago, I am very confused with this problem. To fix this issue, you should delete .idea/vcs.xml
, then restart your Android Studio. Good Luck!
一个月前我遇到了同样的问题,我对这个问题很困惑。要解决此问题,您应该删除.idea/vcs.xml
,然后重新启动您的 Android Studio。祝你好运!