3

I am new to Android Studio. I am wondering if I could create different branches to run my application. Likewise for example, if there is any possibility to have same copy of application but the difference would be just that ,one would run the production app and the other branch would run the test app.

So please suggest some method if available, to create branches or tags in Android Studio.

6
  • You are talking about version control branches or tags? Or do you want to support variations of your app like a free version and a payed app? Commented Nov 12, 2015 at 6:48
  • Can you please let me know both the possibilities. Commented Nov 12, 2015 at 6:50
  • I would like to know about version control branches and tags. Commented Nov 12, 2015 at 6:52
  • With that version control you can manage multiple features which you can switch while developing. Basically google the word "gitflow" which gives you a better idea. Tags are used to find a stable version number. If you like I can extend this to an answer. Commented Nov 12, 2015 at 6:52
  • yes kindly explain how can I create a branch in Android Studio 1.4 Commented Nov 12, 2015 at 6:56

2 Answers 2

4

For this I would recoment to use gitflow here is an explanation image from nvie.com.

gitflow explanation

You can find the details in the link above. In short you use it to maintain features independed. You work on the development branch and your stable version is the master branch. So you can add fixes for the stable version without getting issues while fixing bugs with committed changes.

Back to your question how to add a branch in Android Studio click on the lower right edge in Android Studio and create that branch you want to:

check here and there

If you need more information write a comment.

Sign up to request clarification or add additional context in comments.

Comments

0

Create an account on github.com or bitbucket.com

then create a new repository for your project

Please read this git doc: https://git-scm.com/book/fr/v1/D%C3%A9marrage-rapide it's in french but there is an english version here https://git-scm.com : in command line init git for your project:

cd ~/project-path-here
git init
git add .
git commit -am "initial commit"
git remote add origin <your link>
git push -u origin master

then manage your project with git.

You can create a branch with

git branch -checkout <new_branch_name>

Then you should be merge into your develop, release then master branch. You can use this git flow nvie.com

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.