Git 2.19 - Recommended GIT commands leads to unexpected result and warnings

Summary

recommended commands to checkout a branch leads to error message in git >= 2.19 happens for Gitlab version GitLab Enterprise Edition 11.2.3-ee commit: https://gitlab.com/gitlab-org/gitlab-ee/commits/aadca99

Steps to reproduce

  • install version 2.19 of GIT
  • create a project in Gitlab
  • create a new branch
  • go to that branch and

Example Project

What is the current bug behavior?

Recommended commands leads to a warning in GIT. GIT doesn't create branch it just applies the changes in a wrong way.

What is the expected correct behavior?

git fetch origin git checkout -b <branch-name> /refs/remote/origin/<branch-name>

Relevant logs and/or screenshots

Screenshot_from_2018-09-26_23-16-34

Output of checks

(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)

Results of GitLab environment info

Expand for output related to GitLab environment info

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:env:info)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)

Results of GitLab application Check

Expand for output related to the GitLab application check

(For installations with omnibus-gitlab package run and paste the output of: sudo gitlab-rake gitlab:check SANITIZE=true)

(For installations from source run and paste the output of: sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)

(we will only investigate if the tests are passing)

Possible fixes

(If you can, link to the line of code that might be responsible for the problem)

Edited Jun 18, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading