I've accidentally done a Gerrit style push on a GitLab repo.
That is, while on my local branch I did:
$ git push origin HEAD:refs/for/master
Enumerating objects: 7, done.
Counting objects: 100% (7/7), done.
Delta compression using up to 8 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 3.06 KiB | 184.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0), pack-reused 0
To gitlab.domain-name.com:project-name.git
* [new reference] HEAD -> refs/for/master
When what I should have done was a simple:
$ git push -u origin branch-name
This reference does not show anywhere on the GitLab web GUI as far as I can tell.
How can I undo this? Do I need to?
You can delete the reference on the remote with the following command:
Full demo: