1

I'm using bitbucket linky to clone my project repository from bitbucket. I installed the bitbucket linky plug-in since there is no default support in IntelliJ so far. I am cloning it using VS -> Checkout from version control -> Git but by default it clone from develop branch

Is there a way to choose the branch before you clone it?

Lucky
  • 107
  • 3
  • 9
  • What do you mean there is no support in IntelliJ? See my answer here: https://stackoverflow.com/questions/44642188/how-to-use-bitbucket-as-a-repository-in-intellij/44643548#44643548. – mkasberg Feb 09 '18 at 22:28
  • thanks for the response but i could not find the bitbucket settings after clicking the user button on bottom-right corner. its giving some option : Hightlight level (none, syntax and Inspections) – Lucky Feb 09 '18 at 23:20
  • IDK how else to explain it. It's just the normal settings page on Bitbucket.com. Like, the same place you'd go to change your password. – mkasberg Feb 12 '18 at 20:24

1 Answers1

1

When you clone a repository, git will clone the default branch (remote HEAD) of the remote repository. That is often master but may sometimes be another branch, such as develop. In a normal git workflow (and also when using IntelliJ's UI), you can change branches on the client side at any time after you clone. IntelliJ should help you make sure they are up-to-date with their upstream counterparts (which is also easy to do on the command line if you prefer).

mkasberg
  • 16,022
  • 3
  • 42
  • 46
  • thanks, yes, that is possible but another thing i would like to know if project root does not have pom.xml and after importing the project from git, if i want to run the pom.xml to install all the dependencies, how can i do that? Appreciate your support! – Lucky Feb 10 '18 at 01:18
  • If pom.xml doesn't exist, you'll need to create it. That file should be checked in to Git for any Maven project. – mkasberg Feb 12 '18 at 20:26