1

in a "mirror"ed clone of a repo from Github, I find a lot of commits marked with light purple labels. The labels are named "pull/91/merge", "pull/92/head", "pull/89/head", etc. Here is a image.

gitk image.

They are not branch or tag labels. "git branch --list" only returns "master". And "git tag --list" returns nothing. If I right click on one in gitk, no menu pops up. If it was a tag or branch label, a right menu would pop up allowing me to delete, move, copy, etc.

What are they and how would I work with them? -- delete, rename, convert to branch, etc.

EDIT: I think they're related to pull requests done on Github. This is a "mirror"ed repo from Github after doing "git clone --mirror". Github likely put them there and they shouldn't be touched. But still, what are they and how do you manipulate them with git?

John Pankowicz
  • 4,203
  • 2
  • 29
  • 47

1 Answers1

1

In git, there are various kinds of references. Branches and tags are specific kinds of references with functionality attached to them.

The pull requests in your case are references as well, but of no specific kind. They are pointers to commits. You can use them in various commands, otherwise they won't do anything. Deleting them in your local repository will not affect a remote repository.

To list references:

git show-ref

To change or delete references:

git update-ref

As to where they come from, I can only guess that Github creates them for their server-side handling of pull requests.

stefandtw
  • 468
  • 6
  • 5