Pages

Wednesday, January 27, 2016

Installing Gradle 2.1 On Ubuntu

Ubuntu Repository has old version of Gradle, i.e. 1.4


gradle --version

------------------------------------------------------------
Gradle 1.4
------------------------------------------------------------

Gradle build time: Monday, September 9, 2013 8:44:25 PM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.9.3 compiled on April 8 2014
Ivy: non official version
JVM: 1.7.0_79 (Oracle Corporation 24.79-b02)
OS: Linux 3.13.0-63-generic amd64


Now In order to install latest version of gradle (2.1 in my case) you need to do following steps

$ sudo add-apt-repository ppa:cwchien/gradle

$ sudo apt-get update

$ sudo apt-get install gradle

After This Step, Wait for Apt-get to Install Grade.

Finally gradle is installed :-) Good Luck
gradle -v

------------------------------------------------------------
Gradle 2.10
------------------------------------------------------------

Build time:   2015-12-21 21:15:04 UTC
Build number: none
Revision:     276bdcded730f53aa8c11b479986aafa58e124a6

Groovy:       2.4.4
Ant:          Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM:          1.7.0_67 (Oracle Corporation 24.65-b04)
OS:           Linux 3.13.0-63-generic amd64


You can comment or email me if you have any query 

Wednesday, January 20, 2016

How to Fetch All Branch from a Repository?

Well Again !! The problem this blog solves is related to git.

The question is, how to fetch all remote branches at git? Well I found a simple answer to it on Stackoverflow

That is 

cd repo
In this Step, we are changing our directory where we want to clone our project (First needs to be created)

git clone --bare http://github.com/path/to/repo.git ./.git
This clones (bare) repository (only .git directory) to your local

git config unset core.bare
This step unset the variable bare and gives you regular/normal repository


and I think thats it, you can now select your branches using git branch {branch name}

Note: At this point you have a complete copy of the remote repo with all of it's branches (verify with git branch). You can use --mirror instead of --bare if your remote repo has remotes of its own.