title: How to push an Android Studio Project to a remote GitLab Repository
body: <p>I am coming from the eclipse/svn world and for a new android project with android studio I decided it might be a good time to learn more about GIT. After some research I decided to install <a href="https://about.gitlab.com/" rel="nofollow noreferrer">GitLab</a> on my server in the same network, since it seems to perfectly fit my needs and I prefer to have the data on my server. The installation was done fast and I was able to connect to the webinterface on the server from my local machine. </p>
  
  <p>Now I wanted to push a prototype in form of an android project to my <code>GitLab</code> Repository on the server. Here I started getting confused on how to start. </p>
  
  <p>First I installed <a href="http://git-scm.com/downloads" rel="nofollow noreferrer">GIT</a> on my local machine and enabled it in my android studio project, and succeded to commit files (eventhough I wasn't really sure, where these files get commited to,.. does enabling git create a local repository for that project?). </p>
  
  <p>Ok, next I of course want these committed files to end up in a Repository of my <code>GitLab</code> remote server. I found this <a href="https://stackoverflow.com/questions/16677931/connecting-to-gitlab-repositories-on-android-studio">topic</a> but unfortunately I did not understand how to exactly add my server as a remote host.</p>
  
  <p>I tried using <code>gitbash</code> and used</p>
  
  <pre><code>git remote add origin https://[serverip]:[gitlabport]
  </code></pre>
  
  <p>but this did not seem to change anything. Whenever I commit (also tried commit and push) from UI there was no new repository on my GitLab Web Interface.</p>
  
  <p>Using gitbash to push as suggested by Makoto with </p>
  
  <pre><code>git push -u origin master
  </code></pre>
  
  <p>reveals the following error:</p>
  
  <pre><code>"fatal: 'https://[serverip]:[gitlabport]/info/refs not valid: is this a git repository?
  </code></pre>
  
  <p>So I guess I need to let <code>git remote add</code> point to an already existing repository? And why does the Android Studio UI not reveal errors as well? Is gitbash <code>git push</code> different from commit and push in the android studio UI?</p>