0

I have a local project which I imported from a remote git repo to Android Studio and I am wondering how I can commit this project into my remote repo through android studio?

For what I have done; I have been able to create a local git repo through Android Studio.

P.S: I am new to version control and I understand my question might not be very clear, I will take any corrections or guides that will help me further my understanding of VCS as well as questions to clarify my problem. Thanks.

uruemu
  • 607
  • 6
  • 12

1 Answers1

0

It seems that Android Studio does not provide this functionality. I got this information from here (Step 2). These are the commands for the commandline (See here):

git remote add origin user@host:path/to/git_repo.git
git push origin master

origin is just the name of the remote you're using. If you already have a remote, than origin is already in use. Just replace origin by something else. master should be replaced by your branch name.

Jan
  • 1,004
  • 6
  • 23
  • Thanks for your response. I am still having trouble after following these steps, at the push stage I get; error failed to push some refs, updates were rejected because the tip o your current branch is behind... – uruemu Feb 19 '15 at 16:56
  • Like [this](http://stackoverflow.com/questions/1713137/how-to-merge-remote-changes-at-github)? Did you connect your local repo to the matching remote repo? Seems remote has more commits than your local. Thought your remote repo is emtpy for your new project... – Jan Feb 19 '15 at 19:34