This has recently just started happening. Whenever I make changes on an Android project the changes don't show up on my Github desktop for me to commit and sync. I instead have to commit and push changes from Android Studio itself. The history of my commits from Android Studio show but not recent changes.
Can someone shed light onto why this is happening?
You have to make sure the .git folder and the working tree used both by Android Studio (as shown in those screenshots) and GitHub Desktop are the same.
Try and import in GitHub Desktop the exact path of the repo used by Android Studio.
Related
I'm working on an Android project for my company.
Here is my current development setup:
Android Studio (version 2.3)
GitKraken (version 2.1.0)
Ubuntu (version 16.04)
As I make improvements to my project in Android Studio, I use GitKraken to review my changes and commit them to GitHub. Nothing out of the ordinary.
My problem is that every once in awhile, files will be committed directly to my 'master' branch and pushed directly to GitHub - without me doing anything. The files that are pushed are configuration .xml files that I haven't changed. This is very frustrating, for obvious reasons. The commit message that is generated usually looks like:
AI-2.3 trent#trent-Lenovo-Yoga-3-14 Create hg.xml
I have deleted my 'master' branch completely (local and GitHub), and created a new branch called 'stable' to take it's place. That didn't work, as these 'auto commits' simply create 'master' branch again and push it to GitHub.
I have also turned off VCS settings in Android Studio. I cannot find any setting in GitKraken would be doing this - to my knowledge, anyway.
I'm hoping that I'm unaware of a simple setting that can stop this behavior. I've searched for similar issues on Google, Android Studio forums, and Stack Overflow, with no luck.
Please let me know if you have any questions.
Got the same problem with Android Studio 2.3.3 and Ubuntu 16.04.
The problem occurred after Android Studio (AS) glitch when it lost my private IDE settings.
Solution: look into dir ~/.AndroidStudio2.3/config/settingsRepository (take notes that .AndroidStudio2.3 is hidden dir). In my case, there is repository dir that contains my Project plus all that wired additional setting files that been added to my GitHub master branch every time I've Push. Just delete that repository dir.
Looks like AS use its own source control system on top of Git. As I can see some people even use it for backing up their settings:
https://github.com/kakkoyun/android-studio-settings
https://github.com/xinthink/android-studio-settings
Didn't go dip into the problem, just solve it for my case. Would be good if any Expert explain that strange Android Studio behavior in more details.
Also related to Android Studio keeps adding additional files to GitHub
I am using Android Studio 2.0 Beta 6 on Ubuntu GNOME. I am facing a strange problem. I am using git version control in my Android project. After building the project, when I click on commit changes through Android Studio GUI. The commit changes dialog box shows every file as changed. When I click on any file, it says contents are identical. I am attaching the screenshot below, clicking on any files says contents are identical.
So my question is, Why Android Studio shows files with identical changes in commit changes dialog and how can I solve it? I tried google but didn't found any related question.
It must be because of automatic file encoding changes by the IDE (In case you imported the project from somewhere else). Sometimes IDEs apply them automatically. Just revert the changes and do a clean and build. If the changes appear again, you will need to do a commit once and after that you'll be allright.
To verify you can just go to a normally behaving file. Open it in notepad and just save as from notepad with another encoding. It should show as modified thereafter in the version control window.
For me it was AS pointing to old git version. Please check the Settings\Version Control\Git
I ran into this issue as well. None of the typical culprits seemed to be at fault. As far as git (from the command line) was concerned, the files were unmodified, yet Android Studio still showed them as modified.
It turns out Android Studio and my command line terminal (cygwin) were using two completely different Git binaries. Android Studio was pointing to a Git installation I had made at some point in the past, while cygwin was pointing to /usr/bin/git, which had come from Cygwin's Git package.
I edited Android Studio's version control settings (as shown in Anton's screenshot) to point to the git.exe within my Cygwin distribution, then did a "refresh file status" from the VCS menu, and all the files went back to showing as unmodified.
I'm working on an Android application and I've pushed it to GitHub from my windows computer, I'm having problems to pull the code from repository in Mac OS, when it downloads it shows like if the project was corrupt or something.
It shows this:
As you can see the project doesn't download the folder app and all the files that i pushed to the Repository
I might not be pushing it correctly because i've tried to clone well built Android repositories and and they work nicely.
Thanks a lot for your help and Sorry for my English.
Things which you need to do, crate a directory where you want the project to be set up this.
I made a directory called Juanjors_AndroidMeneame and navigated my git bash there.
as shown in the image initialize local git repository.
and then pull the data. as shown in the image
git pull https://github.com/Juanjors/AndroidMeneame.git
after this import the project, and this is what you will get
How can I work an Android studio project from work and later at home without having configuration issues, shall I use something like dropbox ?
You will be delighted to know that there wont be any configuration issues at all.
Android Studio Projects ar portable.
You just have to Copy the project from office. Bring it at home. And import it in your Android Studio by clicking Import existing android studio project. 1st time it will show an error message, mentioning that the sdk directory didn't matched. But don't worry, clicking OK button will solve the issue it self.
Just make sure your sdk manager is up to date in both machine of home and office.
I recently downloaded the Bitbucket plugin for Android Studio (I'm running 1.1.0). Initially, I downloaded it from this link (https://plugins.jetbrains.com/plugin/6207?pr=phpStorm) which should be compatible with Android studio.
When I tried to clone a project in my repo, it prompted me for login credentials. I entered them, but it tells me that I can't connect to bitbucket. Then I installed the plugin from the plugin settings page seen here
I made sure that the plugin was enabled. I'm thinking this is an issue that has to do with proxy settings (I'm currently on my college campuses network, but I can connect to other VCS services like Git without problems so I doubt that's the problem).
Any suggestions?
EDIT:
Going into Bitbucket's settings and testing it shows this:
Had the same problem some time ago. Though I have not yet upgraded to 1.1, I found this implementation to work with previous version:
https://bitbucket.org/dmitry_cherkas/jetbrains-bitbucket-connector/downloads
It seems the "official" one is outdated and this one is working fine.
Please, let me know if this does work for you.
Regards
Jose
you don't really need bitbucket plugin.
Push your project to bitbucket
create a new repo in bitbucket
click on "I have an existing project" in bitbucket repo
execute these commands in Android studio Terminal to push your project to bitbucket
Checkout from Bitbucket
you can also checkout bitbucket projects giving bitbucket URL in "Checkout from GitHub" option in Android Studio
If you are still having problems (like I was recently) even though you've tried the plugin and you feel uncomfortable or not knowledgeable about initializing git for your project by hand via terminal you can use SourceTree. You will have no problems with BitBucket using source tree since both are made by Atlassian.
Once you've installed SourceTree and walked through the first boot setup process giving SourceTree your credentials you click Clone/New and a dialog will pop up. There will be the normal browse button and also a button button that looks like a globe allowing you to browse the hosted projects linked to your BitBucket account. You can also copy an paste the link from the project home on bitbucket as well. Once you've chosen the repo you want to clone, pick the destination folder and if you want to bookmark the project or not and press "clone".
Once clowning is complete you should hit the pull button to pull down the latest changes picking the appropriate branch you want to pull from. When pulling is complete you should have all the files that's on the head of that branch (master if not specified) which in most cases is an android project.
Open Android Studio and choose File->Open and browse to the folder you just pulled data to and that open the android project. Once that is done and the project is open make sure you go to VCS and you should not see "Enable Version Control Integration". If you see this that means android studio does not see the .git folder hidden in the project root (or something in that ball park....maybe it's really not in the project root). If you see git commit and git pull options then you are now using version control and bitbucket as your remote repo. Make a change to a file and you should see it turn blue specifying that changes have been made but not committed.
For more info on version control in android studio see this video https://youtu.be/Ldmc757EXaE?t=6m47s and the documentation on the intellij website.