Git: "+refs/heads/<branch>:refs/remotes/origin/<branch>"

Viewed 2138

Jenkins Git plugin generated the below command in console output based on my ref spec

  1. What's the difference between below 2 commands? Their output looks little different. I have given their output below:

    Command 1:

    git fetch --no-tags --progress repo.git +refs/heads/qa:refs/remotes/origin/qa --depth=1

    Output:

    From <repo>
     * [new branch]      qa         -> origin/qa
    

    Command 2:

    git fetch --no-tags --progress repo.git refs/heads/qa --depth=1

    Output:

    From <repo>
     * branch            qa         -> FETCH_HEAD
    
  2. What does FETCH_HEAD here mean?

  3. I believe refs/heads/qa is local working copy of 'qa' branch and refs/remotes/origin/qa is remote 'qa' branch. But, what does this convention imply?

    +refs/heads/qa:refs/remotes/origin/qa

1 Answers
Related