Skip to content

Instantly share code, notes, and snippets.

@oyeb
Last active May 9, 2017 16:14
Show Gist options
  • Save oyeb/84847c835ba5c7b73188cdcdd1c33115 to your computer and use it in GitHub Desktop.
Save oyeb/84847c835ba5c7b73188cdcdd1c33115 to your computer and use it in GitHub Desktop.
Tips on how to submit the course project

Submitting your Android project

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:

http://git.amritanet.edu

Note the net after amrita

0. (Optional) Read our wiki

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.

0. Make an account on Amrita Gitlab

I'm assuming you've managed to do that.

1. Make a local repository

The best way to do this is using the Android Studio.
The installation of Android Studio usually includes git with it.

Test if you have git

Go to the Terminal tab on Android Studio. Terminal tab Check the output of git --version 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.

Initialising the repository

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):

  1. add the project files to this (new and empty) repository.
  2. 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: VCS tab

2. Creating a project on Amrita Gitlab CE

Login and create a new project. This is what I filled, tweak as necessary. New project

2.1 Change your connection/clone method

Change to HTTP (unless you have uploaded your public SSH key to Amrita Gitlab)

CLone method

3. Connect local repo to Gitlab project

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".

3.1 Find your remote reference

Scroll down the page your empty project's home page and look for "Existing Git repository". connect

3.2 Add reference using Terminal

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. remote_addded

Now see what references your local repo has by running git remote -v (this lists all remote references known to this local repo.)

3.3 Make sure you have a good README

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.

4. Push to remote

The pre-final step

open-push-dialog 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. Imgur

The IDE should now ask you for a password. Enter the password for your Amrita Gitlab account. passwd

If the push was successful, you'll see a small popup on the Version Control tab. success

Refresh your project page in your browser, you'll see your empty repo has now been populated with the project!

5. Moving project to "Android 2017" group 🆕

The final step

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. request-access 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. Imgur Look for Share project with other groups, select Android 2017 and check that your project now appears in the Group project list. Imgur

6. Further Reading

If you found this helpful, you will find the Gitlab wiki extremely helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment