Github & Its Versioning – Complete Method
What is GitHub:
Github is actually a platform for Software Developers, where developers from all over the world collaborate with each other on code and report bugs.
As a coder, one can’t avoid using GitHub or Git-based tools. It can be used to share code or to help other people facing code issues. This topic would deeply explain about connecting your App with GitHub and control its versioning for improving workflow accordingly.
What is Version Control:
Version control is basically a process of managing projects in a more synchronized form. By using this sort of Versioning, you can manage projects remotely. Moreover, you can make branch public/private according to needs.
So, Let’s create a project using the android studio.
Project Creation:
Run Android Studio on Windows/Mac & follow these steps accordingly with the help of infographics.

Click on next & move towards the configuration of the project.

Create a new module or library here.



Now, create a Java Class in the library by name “HelperMethod”
Make a string var in this class
Public static String name = "helperMethod";
Afterward, add an account of Github on the Android studio. If it is added already, then proceed towards the following.
Add that account to Android Studio:

Now enable GitHub Version control integration from VCS.


Select Git Option & Commit it.
Commit message: “New APPLICATION CREATED”
Commit your message means, finalization of changes you have done.


Now share your project on Github.

Here, you can clearly see a project in your Git panel. Make branch as private, otherwise, it’s gonna visible to all viewers.
Now, copy the link from Github project and paste it to Jitpack.
Create a second new project, for doing Versioning.
Then add following in build Gradle under all projects.
maven { url 'https://jitpack.io' }

Click on the Look Up option, it will give an error of no access token. Because your project is private. So make it public by going to Github > Settings > DangerZone and make your branch Public.
Don’t forget to typing your project name to confirm it as public.
Sign Up to Jitpack,
Click button Look Up, it will give you 3 options.
Click on Get it and add the repositories in your Gradle

Add a dependency to your project:
dependencies {implementation 'com.github.yourUserName:GithubVersioning:7ceeff640d'}
Now add toast to the main activity and access class of your other project. If it is accessible, this means that you are going in the right direction. When you again commit, it will show that there are 2 commits in Github panel.

How to release a commit on Github?
We need to release a publish, if you want to display the latest code then you have to release your latest commits. Click on the release tab

Then click on the new release,
Add your release version, it’s title and description as well.
Then publish your release,

Refresh your browser and check out for the new release. The previous Release which was 0 will be updated with 1 release.
Now change dependency in build. gradle file with 1.0 and sync it. You can also create a badge, which will automatically tell you the number of versions you have.
How to Create a Badge:
Add README.md file
Go to jetpack.io, below portion of add dependency. There will be a line, add that into your read.me file and commit it.
This will be added accordingly. Now you can directly check your versions and all of its detail. You can also add more badges, & ApK description, etc.
In last, make your branch private and check dependency. It will be accessible to your other projects.
Github is Everything:
So, I hope this topic clearly reflects each & every aspect of the Github and its Versioning process. Bundle of thanks to Khurria Zaffar (Software Engineer, Codematics.Inc) for sharing her first hand experience over this unique method. I hope it will technically help a lot to all developer guys.
#HappyCoding
You may also like: Galaxy S11 Design & Concept – A Futuristic Smartphone