We are working towards making the instance available on the public internet. For now, all features work when the instance is accessed from Amrita network on:
Note the
net
afteramrita
GitLab, Github and other public VCS servers are NOT FILE SHARING SERVICES. Don't assume that there is a simple upload button that you will click to submit your project.
The Amrita GitLab wiki has a plethora of resources that explain what git
and Gitlab is. There's also a list of best practices for you to follow.
I'm assuming you've managed to do that.
The best way to do this is using the Android Studio.
The installation of Android Studio usually includes git
with it.
Go to the Terminal
tab on Android Studio.
Check the output of
git --version
If you don't have git
, you'll have to install it. There are excellent guides on the internet to set up git
on your computer so that Android Studio can use it, and then operate your project's repository from the IDE itself.
We'll follow this article on Medium for a few steps, not all.
Make sure that you've done the following before proceeding to (2):
- add the project files to this (new and empty) repository.
- Make a commit (or multiple ones)
You will notice that you now have a Version Control
tab, if not, you can go to View > Tool Windows > Version Control
. It should look something like this:
Login and create a new project. This is what I filled, tweak as necessary.
Change to HTTP
(unless you have uploaded your public SSH key to Amrita Gitlab)
To upload your local repository we need to tell Android Studio where you wish to host your project. This is done by setting up a "remote reference".
Scroll down the page your empty project's home page and look for "Existing Git repository".
Navigate to the Terminal
tab on Android Studio.
Copy the git remote add origin git@git.amritanet.edu:<username>/<projectName>
and paste it in the Terminal tab.
Now see what references your local repo has by running git remote -v
(this lists all remote references known to this local repo.)
A README tell the reader what the repo holds, how to build the code (if any non-standard steps are required), lists dependencies and explains how to use the code/software.
Make sure you add a good README (always to the repository root folder), if not adding now.
This will open a dialog where you will have to select which of your commits you wish to upload. This will only work if you completed step 1 and made a commit.
Select the commit you wish to upload.
The IDE should now ask you for a password. Enter the password for your Amrita Gitlab account.
If the push was successful, you'll see a small popup on the Version Control
tab.
Refresh your project page in your browser, you'll see your empty repo has now been populated with the project!
You have to make your project appear on the list of projects shown in Android 2017. For this you first have to join the group.
Request access to the Android 2017 by clicking on the Request Access button.
A member of the group with
Master
or higher privileges will grant you access soon. If not, you can contact the owner Prof. Ritwik.
Once access has been granted, go to the Settings > Members
Tab of your project.
Look for Share project with other groups, select Android 2017 and check that your project now appears in the Group project list.
If you found this helpful, you will find the Gitlab wiki extremely helpful.