0

I have a problem with using git. I created a new repository "test". Then I created the branch "master", put some files in there, committed and pushed it. Everything works fine. Now I create a new branch with

git branch release_test
git checkout release_test
git commit -m "new release"
git push

And two new branches are created. One that is called "release_test", and another one that is called "elease_test". I am 100% sure that there are no spelling mistakes or something like that. I tried this twice with completely new repositories. Does anyone have an idea why this is happening?

Babbel
  • 32
  • 4
  • New branches are created using git checkout -b . Are you using the -b ? – Dante Adams Jun 10 '22 at 05:40
  • No, since I create the branch beforehand with "git branch ". As far as I know, there is no difference between those two methods, despite using -b is probably more elegant. – Babbel Jun 10 '22 at 05:41
  • 1
    @DanteAdams Branches can also be created with `git branch ` like OP did here. `git checkout -b ` is just a shortcut to do that then check it out. – Romain Valeri Jun 10 '22 at 08:29
  • 1
    Do you have a reproducer that others can try? My own guess (but it's just a guess) is that you, or the receiving Git, have set up a Git hook script that has a bug in it, but without a reproducer (a [mre]) guessing is about all we can do. – torek Jun 10 '22 at 12:44
  • @torek Thanks for the hint. I'll check out if I can find any Git hook scripts. Also I'll try to provide a reproducer in the upcoming days. – Babbel Jun 11 '22 at 09:24

0 Answers0