title: Errors on using git commands in Azure pipelines
body: <p>I am working on an Azure pipeline for a dotnet core project that runs on Windows Self hosted agent.
  I want my pipeline to use Git commands to check out the release branch and merge the develop branch into it. Next steps will be to build the release branch and deploy to intranet servers</p>
  <p>I don’t know Git wording very good, I was using TFS for years.  I use the commands below and got the logs <a href="https://drive.google.com/file/d/1btnVaiOcYAFRUqpzPTmVUjuB6NJFlXPk/view?usp=sharing" rel="nofollow noreferrer">here</a>:</p>
  <pre><code>- task: CmdLine@2
    displayName: Checkout Release branch
    inputs:
      script: |
        @echo off
        git checkout release
        git pull develop
        git status
  </code></pre>
  <p>From the logs, I understand:</p>
  <ul>
  <li>It downloads the content of the develop branch because it is the default branch in GitHub, I’d rather want the release branch but I believe Azure is like that</li>
  <li>I manage to switch to release but I have these errors that I don’t understand:
  ##[error]Previous HEAD position was bc94bd2 Update Staging Build Pipeline.yml
  ##[error]Switched to branch 'release'</li>
  <li>I understood that pull can be used with local or remote branch so I use it to fetch and merge the develop branch to the release branch but I get:  [error]fatal: 'develop' does not appear to be a git repository</li>
  <li>Do I have to specify credentials on every calls to git?</li>
  <li>On the last step, it fetches again the code from the develop branch and I understand why</li>
  </ul>
  <p>If you could help me improve my script, that would be great,
  Many thanks.</p>