1

I have posted the question to find the complete solution but unfortunately/mistakenly it has marked as Duplicate

The answer posted in this post has partially help me. But I still need to know how to clone single branch in Android studio. In Android studio, I could see an option to mention the URL (xxxxxxxx.git) and password but it actually clones main repository but there is no option to clone the branch repository directly and I still want to know how to setup the workflow for my approval when my team pushes the code.

Update:

I had to share my credentials(with admin rights) to my team for cloning . Is there any way to let them use their own bit bucket credentials for cloning in Android Studio ? Currently, Android studio requires to enter the repository URL and password for cloning but not user ID.

Please anyone guide me to find out the solution.

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Rakesh L
  • 1,136
  • 4
  • 18
  • 44
  • I was one of the people who marked your earlier question duplicate. Maybe you can tell us why you think you need to clone a single branch? Keep in mind, that for some branches, cloning the entire repo might be a necessity in order to bring in all relevant information. – Tim Biegeleisen Feb 25 '18 at 06:40
  • I need my team to have only the branch for security purpose . I want to restrict them to make any changes in master repository. As Android studio have the option to switch the branches easily , there is the possibility of some member in the team can mistakenly make the changes in main repository of local and realize when committing/pushing it. Even if they do push, it should not impact on cloud branch directly instead there should be a workflow for my approval. – Rakesh L Feb 25 '18 at 06:47
  • No...the client should not be the sentinel here. You need to configure your Git repo to block/prevent unwanted pushes/clones on certain branches. Most likely, you'll want to lock down the `master` branch heavily to make sure no debs accidentally push directly to it (i.e. to production). – Tim Biegeleisen Feb 25 '18 at 06:53
  • I agree with your point. I will find out the way to lock it down. I have another query which I have updated in my question. – Rakesh L Feb 25 '18 at 07:06
  • AFAIK the only two ways to authenticate to a Git repo (e.g. Bitbucket, GitHub, Stash, etc.) is by entering credentials (i.e. username/password), or by using SSL certificates. Maybe look into SSL and see if that might help. – Tim Biegeleisen Feb 25 '18 at 07:17

0 Answers0