title: How to ask Spring Cloud Config server to checkout configuration from specific branch?
body: <p>I have following Spring cloud config application.yml:  </p>
  
  <pre><code>spring: 
    application: 
      name: configserver
    cloud: 
      config: 
        server: 
          git: 
            uri: https://xyz@bitbucket.org/xyz/microservices-configs.git
            username: xyz
            password: xyz
            basedir: target/configs
  server:
    port: 8881  
  </code></pre>
  
  <p>Following is my <code>bootstrap.yml</code> of user microservice:  </p>
  
  <pre><code>spring: 
    application: 
      name: userservice
    cloud: 
      config: 
        uri: http://localhost:8881/  
  </code></pre>
  
  <p><strong>Scenario - 1</strong><br>
  When I hit config server in browser like this:<br>
  <code>http://localhost:8881/development/userservice-development.yml</code><br>
  It serves file properly. and when I look at <code>basedir</code> i.e. target/config, I see:  </p>
  
  <pre><code>- userservice.yml  
  - gateway.yml  
  </code></pre>
  
  <p>Exactly what I wanted, <strong>Since I added this two files only in development branch</strong>.  </p>
  
  <p><strong>Scenario - 2</strong><br>
  When I run my userservice microservice project using following command:<br>
  <code>mvn clean spring-boot:run -Dspring.profiles.active=development</code>  </p>
  
  <p>It fetches the right file from git, but <strong>it checkout from master branch !</strong> but <strong>not from the development branch</strong> as I am expecting. am I expecting right ?  (FYI I have both development and production yml in master branch)  </p>
  
  <p>So the question is, how do we go for using config server ? Is there any configuration which we can set to fetch yml from that particular branch only ? I believe we need to set some label, because as per documentation, default label is master. Can anyone let me know how do we go for setting label in above scenario ?</p>