Move android studio project to an already created Github Repository - android-studio

I made an android studio project and I also have an empty Github repository already created where I am a contributor. How do I move my android studio project to this already created repository?
I tried but I am not able to achieve this.
Any ideas?
Thanks.

The simplest way to do that is not to bring your project into an existing git repository, but to bring git to your project.
At the root of your project:
git init
git remote add origin <url>, where <url> is your GitHub repository's URL.
git branch --set-upstream-to origin/master to setup your default branch and remote.

I managed to solve the problem. Instead of moving the project using android studio to an existing Github repository, I did it locally using the command line. The steps I followed are here. Now its perfect and further commits can be now done directly from the android studio.

Related

Extra file showing in android studio after cloning project

Since a month, I have been cloning the repo by copying link and pasting in my android studio and then I would checkout the "MySpace" branch and continue my work there. But now when I checkout that branch "repository" module gets automatically added there but it is not present in github after switching to that branch.
repository file showing in mySpace branch
repository file not present in GitHub MySpace branch
Repository file is present in master branch in both Github and android studio(that's not an error, that was added by team).
repository file present in master branch
repository file in master branch in android studio
This is the error I am getting in android studio after trying to run the mySpace branch
android studio error log

Deleted a repository in github but it still shows up in android studio? how do i remove it?

Initially, i have 2 repositories on git hub. I deleted one and kept the other.
https://imgur.com/a/9Mq1dim
However, android studio still thinks i have both of them.
https://imgur.com/a/wLBwhLZ
How can i fix this?
Thank you.
I think you still have all the repository remotes locally configured.
Try in the repo folder to see the remote repositories :
git remote -v
And delete the remote with :
git remote rm <remote-name>

Android ndk library not push perfectly to the github

I'm working on a android studio project which has NDK library. I clone the project:
git clone https://github.com/Kitt-AI/snowboy.git
follow the instruction for making swig and after that I modify it little bit and I like to commit it to my own repository in GitHub.
but the problem is after I make a change to the project and try to commit it, it seems not all file committed completely because when I clone it from my repository it's give me this error
Error:Could not list contents of '/Users/xxxxx/test1/SnowboyAlexaDe/src/main/jniLibs'. Couldn't follow symbolic link.
any help would be appreciate.

Android Studio error pushing to Github

Hello
I have a project in my Windows PC in Android Studio 2.3. I'm trying to Share my project on Github. I enabled the use of Git and use the Share Project on Github option, after that option successfully create a new Repository in my Github account but the initial push failed and states that it could not found the repository, and I'm checking the repository was created successfully... Any idea of what it is happening?
Comments:
Settings -> Version Control -> Github I checked the Test option and the host, Login and Password seems to be correctly.
Settings -> Version Control -> Git I checked the Test option and it seems to be correctly.

How can I use Visual Studio to work with a Node.js project from an Openshift Git repository?

To work with Openshift's Node.js platform and to be able to pull or push code to it, Openshift provide you with a Git URL. Openshift require the repository to be structured such that the package.json file is located in the project root.
For local development I've been using Visual Studio 2013 with the Node.js Tools successfully. I also have Windows Git tools installed. I am aware of how a Visual Studio project may be added to Git source control.
I would like to use Visual Studio to work with the Git repository that is pulled from Openshift. The way I would intend to set things up initially is to pull the remote Openshift repository into a locally created Visual Studio solution's repository for my new Node.js project, fix any conflicts, then commit and push.
The problem I have is that the way Visual Studio wants to arrange its files relative to the Git project root conflicts with how Openshift wants the files to be arranged in the repository. Specifically, as mentioned, Openshift expects the package.json to be located in the project root. Visual Studio, however, given its Solution/Project hierarchy, wants the Solution folder to be the Git repository root, but with the package.json in the project subdirectory. I have tried running git init within the project subdirectory (such that the repository root is the project folder rather than the parent solution), but then Visual Studio doesn't recognise that the project is under source control any more.
What are the options I have to be able to synchronise between a VS project and Openshift using Git? The only solution that I can think of so far is to just place a package.json file into the root of the solution which VS would ignore, but Openshift would use. This package.json would prefix .js files it references with the project subdirectory, e.g. main: app.js would become main: someproject\app.js.

Resources