Bitbucket newly created remote branch is not listed












1















Just created a new branch in Bitbucket but I can see it neither in sourcetree nor using the git branch -r command. Why do you think that is? Why I can't see that branch?



Do I need at least 1 commit on this fresh branch to see it in the remote list?



After creating the remote branch (from branch X) I did:



git pull origin X  
git fetch --all
git remote update


I also did git config -e fetch is defined as below for remote X:



[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*


None of them worked. That fresh branch is still invisible.










share|improve this question

























  • Has the newly created branch already been pushed to remote?

    – Andreas
    Nov 22 '18 at 5:54











  • I created the branch on the remote itself (on bitbucket using bitbucket gui)

    – SoftwareTheory
    Nov 22 '18 at 6:09













  • Is the branch visible on bitbucket itself?

    – Andreas
    Nov 22 '18 at 6:20











  • Yes it is visible on the bitbucket gui

    – SoftwareTheory
    Nov 22 '18 at 6:27











  • And git branch -a does not list it?

    – Lasse Vågsæther Karlsen
    Nov 22 '18 at 7:21
















1















Just created a new branch in Bitbucket but I can see it neither in sourcetree nor using the git branch -r command. Why do you think that is? Why I can't see that branch?



Do I need at least 1 commit on this fresh branch to see it in the remote list?



After creating the remote branch (from branch X) I did:



git pull origin X  
git fetch --all
git remote update


I also did git config -e fetch is defined as below for remote X:



[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*


None of them worked. That fresh branch is still invisible.










share|improve this question

























  • Has the newly created branch already been pushed to remote?

    – Andreas
    Nov 22 '18 at 5:54











  • I created the branch on the remote itself (on bitbucket using bitbucket gui)

    – SoftwareTheory
    Nov 22 '18 at 6:09













  • Is the branch visible on bitbucket itself?

    – Andreas
    Nov 22 '18 at 6:20











  • Yes it is visible on the bitbucket gui

    – SoftwareTheory
    Nov 22 '18 at 6:27











  • And git branch -a does not list it?

    – Lasse Vågsæther Karlsen
    Nov 22 '18 at 7:21














1












1








1


1






Just created a new branch in Bitbucket but I can see it neither in sourcetree nor using the git branch -r command. Why do you think that is? Why I can't see that branch?



Do I need at least 1 commit on this fresh branch to see it in the remote list?



After creating the remote branch (from branch X) I did:



git pull origin X  
git fetch --all
git remote update


I also did git config -e fetch is defined as below for remote X:



[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*


None of them worked. That fresh branch is still invisible.










share|improve this question
















Just created a new branch in Bitbucket but I can see it neither in sourcetree nor using the git branch -r command. Why do you think that is? Why I can't see that branch?



Do I need at least 1 commit on this fresh branch to see it in the remote list?



After creating the remote branch (from branch X) I did:



git pull origin X  
git fetch --all
git remote update


I also did git config -e fetch is defined as below for remote X:



[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*


None of them worked. That fresh branch is still invisible.







git bitbucket






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 22 '18 at 23:45







SoftwareTheory

















asked Nov 22 '18 at 5:47









SoftwareTheorySoftwareTheory

5472722




5472722













  • Has the newly created branch already been pushed to remote?

    – Andreas
    Nov 22 '18 at 5:54











  • I created the branch on the remote itself (on bitbucket using bitbucket gui)

    – SoftwareTheory
    Nov 22 '18 at 6:09













  • Is the branch visible on bitbucket itself?

    – Andreas
    Nov 22 '18 at 6:20











  • Yes it is visible on the bitbucket gui

    – SoftwareTheory
    Nov 22 '18 at 6:27











  • And git branch -a does not list it?

    – Lasse Vågsæther Karlsen
    Nov 22 '18 at 7:21



















  • Has the newly created branch already been pushed to remote?

    – Andreas
    Nov 22 '18 at 5:54











  • I created the branch on the remote itself (on bitbucket using bitbucket gui)

    – SoftwareTheory
    Nov 22 '18 at 6:09













  • Is the branch visible on bitbucket itself?

    – Andreas
    Nov 22 '18 at 6:20











  • Yes it is visible on the bitbucket gui

    – SoftwareTheory
    Nov 22 '18 at 6:27











  • And git branch -a does not list it?

    – Lasse Vågsæther Karlsen
    Nov 22 '18 at 7:21

















Has the newly created branch already been pushed to remote?

– Andreas
Nov 22 '18 at 5:54





Has the newly created branch already been pushed to remote?

– Andreas
Nov 22 '18 at 5:54













I created the branch on the remote itself (on bitbucket using bitbucket gui)

– SoftwareTheory
Nov 22 '18 at 6:09







I created the branch on the remote itself (on bitbucket using bitbucket gui)

– SoftwareTheory
Nov 22 '18 at 6:09















Is the branch visible on bitbucket itself?

– Andreas
Nov 22 '18 at 6:20





Is the branch visible on bitbucket itself?

– Andreas
Nov 22 '18 at 6:20













Yes it is visible on the bitbucket gui

– SoftwareTheory
Nov 22 '18 at 6:27





Yes it is visible on the bitbucket gui

– SoftwareTheory
Nov 22 '18 at 6:27













And git branch -a does not list it?

– Lasse Vågsæther Karlsen
Nov 22 '18 at 7:21





And git branch -a does not list it?

– Lasse Vågsæther Karlsen
Nov 22 '18 at 7:21












4 Answers
4






active

oldest

votes


















1














Ok, I found the problem. The problem was actually about my being careless. The branch is created in the remote branch but I was not paying attention to the "Branch type" parameter while creating the branch in Bitbucket. git branch -r was listing all the branches on the remote alphabetically and I was trying to see my branch among the "feature/..." branch list but I had not created the brach as a "feature" branch type, I had created is as a "custom" branch type and it was being listed towards the top of a huge branch list without feature/ prefix. Thanks, @VonC for all the help.






share|improve this answer



















  • 1





    Well spotted. +1. I have added in my answer the command which helps finding your branch in that huge list of remote branches.

    – VonC
    Nov 23 '18 at 14:32





















1















[remote "X"]



If your remote is named X (like your branch), no amount of fetch or pull origin will fetch or pull anything from remote "X".



Even git fetch X might not fetch anything if you have no remote "origin" (and the refspec associate with remote X is refs/remotes/origin/*: if you don't have an origin...)



Type git remote -v and check if origin is actually referencing the right repo.

If you do, git config --local --edit will allow you to go and change your config, fixing the discrepancy between the name of the remote and the refspec.



A git ls-remote | grep X can help detect if the branch actually does exist.






share|improve this answer


























  • Very Sorry. Remote is named origin. Fixed that. An upvote for catching that error in the question though.

    – SoftwareTheory
    Nov 22 '18 at 23:48











  • @SoftwareTheory Does git ls-remote origin list your remote branch X?

    – VonC
    Nov 23 '18 at 8:37











  • unfortunately that won't list it either @VonC

    – SoftwareTheory
    Nov 23 '18 at 11:35













  • Then the branch is not created on the remote side. Maybe try, for testing, to create a commit on that branch through the web UI. And see if a fetch does fetch it.

    – VonC
    Nov 23 '18 at 12:27











  • I found the problem. The problem was actually me not paying attention to the branch type and seeing the branch in a huge alphabetical list of branches.

    – SoftwareTheory
    Nov 23 '18 at 14:12



















-1














Try




git fetch origin




This will bring all branches created in remote to your local.






share|improve this answer































    -1














    You may please try to push your branch to upstream using :



    git push -u origin X





    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53424592%2fbitbucket-newly-created-remote-branch-is-not-listed%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      Ok, I found the problem. The problem was actually about my being careless. The branch is created in the remote branch but I was not paying attention to the "Branch type" parameter while creating the branch in Bitbucket. git branch -r was listing all the branches on the remote alphabetically and I was trying to see my branch among the "feature/..." branch list but I had not created the brach as a "feature" branch type, I had created is as a "custom" branch type and it was being listed towards the top of a huge branch list without feature/ prefix. Thanks, @VonC for all the help.






      share|improve this answer



















      • 1





        Well spotted. +1. I have added in my answer the command which helps finding your branch in that huge list of remote branches.

        – VonC
        Nov 23 '18 at 14:32


















      1














      Ok, I found the problem. The problem was actually about my being careless. The branch is created in the remote branch but I was not paying attention to the "Branch type" parameter while creating the branch in Bitbucket. git branch -r was listing all the branches on the remote alphabetically and I was trying to see my branch among the "feature/..." branch list but I had not created the brach as a "feature" branch type, I had created is as a "custom" branch type and it was being listed towards the top of a huge branch list without feature/ prefix. Thanks, @VonC for all the help.






      share|improve this answer



















      • 1





        Well spotted. +1. I have added in my answer the command which helps finding your branch in that huge list of remote branches.

        – VonC
        Nov 23 '18 at 14:32
















      1












      1








      1







      Ok, I found the problem. The problem was actually about my being careless. The branch is created in the remote branch but I was not paying attention to the "Branch type" parameter while creating the branch in Bitbucket. git branch -r was listing all the branches on the remote alphabetically and I was trying to see my branch among the "feature/..." branch list but I had not created the brach as a "feature" branch type, I had created is as a "custom" branch type and it was being listed towards the top of a huge branch list without feature/ prefix. Thanks, @VonC for all the help.






      share|improve this answer













      Ok, I found the problem. The problem was actually about my being careless. The branch is created in the remote branch but I was not paying attention to the "Branch type" parameter while creating the branch in Bitbucket. git branch -r was listing all the branches on the remote alphabetically and I was trying to see my branch among the "feature/..." branch list but I had not created the brach as a "feature" branch type, I had created is as a "custom" branch type and it was being listed towards the top of a huge branch list without feature/ prefix. Thanks, @VonC for all the help.







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Nov 23 '18 at 14:11









      SoftwareTheorySoftwareTheory

      5472722




      5472722








      • 1





        Well spotted. +1. I have added in my answer the command which helps finding your branch in that huge list of remote branches.

        – VonC
        Nov 23 '18 at 14:32
















      • 1





        Well spotted. +1. I have added in my answer the command which helps finding your branch in that huge list of remote branches.

        – VonC
        Nov 23 '18 at 14:32










      1




      1





      Well spotted. +1. I have added in my answer the command which helps finding your branch in that huge list of remote branches.

      – VonC
      Nov 23 '18 at 14:32







      Well spotted. +1. I have added in my answer the command which helps finding your branch in that huge list of remote branches.

      – VonC
      Nov 23 '18 at 14:32















      1















      [remote "X"]



      If your remote is named X (like your branch), no amount of fetch or pull origin will fetch or pull anything from remote "X".



      Even git fetch X might not fetch anything if you have no remote "origin" (and the refspec associate with remote X is refs/remotes/origin/*: if you don't have an origin...)



      Type git remote -v and check if origin is actually referencing the right repo.

      If you do, git config --local --edit will allow you to go and change your config, fixing the discrepancy between the name of the remote and the refspec.



      A git ls-remote | grep X can help detect if the branch actually does exist.






      share|improve this answer


























      • Very Sorry. Remote is named origin. Fixed that. An upvote for catching that error in the question though.

        – SoftwareTheory
        Nov 22 '18 at 23:48











      • @SoftwareTheory Does git ls-remote origin list your remote branch X?

        – VonC
        Nov 23 '18 at 8:37











      • unfortunately that won't list it either @VonC

        – SoftwareTheory
        Nov 23 '18 at 11:35













      • Then the branch is not created on the remote side. Maybe try, for testing, to create a commit on that branch through the web UI. And see if a fetch does fetch it.

        – VonC
        Nov 23 '18 at 12:27











      • I found the problem. The problem was actually me not paying attention to the branch type and seeing the branch in a huge alphabetical list of branches.

        – SoftwareTheory
        Nov 23 '18 at 14:12
















      1















      [remote "X"]



      If your remote is named X (like your branch), no amount of fetch or pull origin will fetch or pull anything from remote "X".



      Even git fetch X might not fetch anything if you have no remote "origin" (and the refspec associate with remote X is refs/remotes/origin/*: if you don't have an origin...)



      Type git remote -v and check if origin is actually referencing the right repo.

      If you do, git config --local --edit will allow you to go and change your config, fixing the discrepancy between the name of the remote and the refspec.



      A git ls-remote | grep X can help detect if the branch actually does exist.






      share|improve this answer


























      • Very Sorry. Remote is named origin. Fixed that. An upvote for catching that error in the question though.

        – SoftwareTheory
        Nov 22 '18 at 23:48











      • @SoftwareTheory Does git ls-remote origin list your remote branch X?

        – VonC
        Nov 23 '18 at 8:37











      • unfortunately that won't list it either @VonC

        – SoftwareTheory
        Nov 23 '18 at 11:35













      • Then the branch is not created on the remote side. Maybe try, for testing, to create a commit on that branch through the web UI. And see if a fetch does fetch it.

        – VonC
        Nov 23 '18 at 12:27











      • I found the problem. The problem was actually me not paying attention to the branch type and seeing the branch in a huge alphabetical list of branches.

        – SoftwareTheory
        Nov 23 '18 at 14:12














      1












      1








      1








      [remote "X"]



      If your remote is named X (like your branch), no amount of fetch or pull origin will fetch or pull anything from remote "X".



      Even git fetch X might not fetch anything if you have no remote "origin" (and the refspec associate with remote X is refs/remotes/origin/*: if you don't have an origin...)



      Type git remote -v and check if origin is actually referencing the right repo.

      If you do, git config --local --edit will allow you to go and change your config, fixing the discrepancy between the name of the remote and the refspec.



      A git ls-remote | grep X can help detect if the branch actually does exist.






      share|improve this answer
















      [remote "X"]



      If your remote is named X (like your branch), no amount of fetch or pull origin will fetch or pull anything from remote "X".



      Even git fetch X might not fetch anything if you have no remote "origin" (and the refspec associate with remote X is refs/remotes/origin/*: if you don't have an origin...)



      Type git remote -v and check if origin is actually referencing the right repo.

      If you do, git config --local --edit will allow you to go and change your config, fixing the discrepancy between the name of the remote and the refspec.



      A git ls-remote | grep X can help detect if the branch actually does exist.







      share|improve this answer














      share|improve this answer



      share|improve this answer








      edited Nov 23 '18 at 14:31

























      answered Nov 22 '18 at 21:47









      VonCVonC

      835k29126313175




      835k29126313175













      • Very Sorry. Remote is named origin. Fixed that. An upvote for catching that error in the question though.

        – SoftwareTheory
        Nov 22 '18 at 23:48











      • @SoftwareTheory Does git ls-remote origin list your remote branch X?

        – VonC
        Nov 23 '18 at 8:37











      • unfortunately that won't list it either @VonC

        – SoftwareTheory
        Nov 23 '18 at 11:35













      • Then the branch is not created on the remote side. Maybe try, for testing, to create a commit on that branch through the web UI. And see if a fetch does fetch it.

        – VonC
        Nov 23 '18 at 12:27











      • I found the problem. The problem was actually me not paying attention to the branch type and seeing the branch in a huge alphabetical list of branches.

        – SoftwareTheory
        Nov 23 '18 at 14:12



















      • Very Sorry. Remote is named origin. Fixed that. An upvote for catching that error in the question though.

        – SoftwareTheory
        Nov 22 '18 at 23:48











      • @SoftwareTheory Does git ls-remote origin list your remote branch X?

        – VonC
        Nov 23 '18 at 8:37











      • unfortunately that won't list it either @VonC

        – SoftwareTheory
        Nov 23 '18 at 11:35













      • Then the branch is not created on the remote side. Maybe try, for testing, to create a commit on that branch through the web UI. And see if a fetch does fetch it.

        – VonC
        Nov 23 '18 at 12:27











      • I found the problem. The problem was actually me not paying attention to the branch type and seeing the branch in a huge alphabetical list of branches.

        – SoftwareTheory
        Nov 23 '18 at 14:12

















      Very Sorry. Remote is named origin. Fixed that. An upvote for catching that error in the question though.

      – SoftwareTheory
      Nov 22 '18 at 23:48





      Very Sorry. Remote is named origin. Fixed that. An upvote for catching that error in the question though.

      – SoftwareTheory
      Nov 22 '18 at 23:48













      @SoftwareTheory Does git ls-remote origin list your remote branch X?

      – VonC
      Nov 23 '18 at 8:37





      @SoftwareTheory Does git ls-remote origin list your remote branch X?

      – VonC
      Nov 23 '18 at 8:37













      unfortunately that won't list it either @VonC

      – SoftwareTheory
      Nov 23 '18 at 11:35







      unfortunately that won't list it either @VonC

      – SoftwareTheory
      Nov 23 '18 at 11:35















      Then the branch is not created on the remote side. Maybe try, for testing, to create a commit on that branch through the web UI. And see if a fetch does fetch it.

      – VonC
      Nov 23 '18 at 12:27





      Then the branch is not created on the remote side. Maybe try, for testing, to create a commit on that branch through the web UI. And see if a fetch does fetch it.

      – VonC
      Nov 23 '18 at 12:27













      I found the problem. The problem was actually me not paying attention to the branch type and seeing the branch in a huge alphabetical list of branches.

      – SoftwareTheory
      Nov 23 '18 at 14:12





      I found the problem. The problem was actually me not paying attention to the branch type and seeing the branch in a huge alphabetical list of branches.

      – SoftwareTheory
      Nov 23 '18 at 14:12











      -1














      Try




      git fetch origin




      This will bring all branches created in remote to your local.






      share|improve this answer




























        -1














        Try




        git fetch origin




        This will bring all branches created in remote to your local.






        share|improve this answer


























          -1












          -1








          -1







          Try




          git fetch origin




          This will bring all branches created in remote to your local.






          share|improve this answer













          Try




          git fetch origin




          This will bring all branches created in remote to your local.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 22 '18 at 7:13









          JeevanJeevan

          1326




          1326























              -1














              You may please try to push your branch to upstream using :



              git push -u origin X





              share|improve this answer




























                -1














                You may please try to push your branch to upstream using :



                git push -u origin X





                share|improve this answer


























                  -1












                  -1








                  -1







                  You may please try to push your branch to upstream using :



                  git push -u origin X





                  share|improve this answer













                  You may please try to push your branch to upstream using :



                  git push -u origin X






                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 22 '18 at 7:32









                  Naveen MunjalNaveen Munjal

                  666




                  666






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53424592%2fbitbucket-newly-created-remote-branch-is-not-listed%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Wiesbaden

                      Marschland

                      Dieringhausen