I recently started using Eclipse Kepler with EGit plugin and these branches are not what I am used to. Is there a way to permanently stop these branches from being created? I tried removing them manually, but it does not work and I don't want to have them the next time I do fetch or rebase.
Asked
Active
Viewed 4,121 times
6
-
These are not really branches, in the usual sense. See http://stackoverflow.com/questions/17595524/orig-head-fetch-head-merge-head-etc?rq=1 – torek Aug 02 '13 at 08:02
-
Do you mean Egit creates local branches for *all* remote branches it finds on cloning a repo? What a `git branch -avvv` returns in your repo (in a shell) – VonC Aug 02 '13 at 08:03
-
@torek I understand that, they are like HEAD pointer. However, I don't find them useful and would like for them not to be shown. – Banana Aug 02 '13 at 08:11
-
1`git fetch` and `git rebase` will re-create them every time. You can either manually remove the files from the `.git` subdir, or filter away the appearance of the branch names, but they will come back like a bad case of tinea cruris. :-) – torek Aug 02 '13 at 08:15
-
@VonC These branches are not listed on git branch -avvv – Banana Aug 02 '13 at 08:16
-
@torek And how would I filter away their appearance? – Banana Aug 02 '13 at 08:17
-
Got me, I don't use Egit. (If I did maybe I could supply a real answer...) I note that regular git doesn't show them: I have a `.git` with `FETCH_HEAD`, `HEAD`, etc in it and `git branch` does not show those. – torek Aug 02 '13 at 08:28
2 Answers
13
As I understand from the comments on your question, you only want these refs not to be shown in History
view.
You may try to uncheck Additional Refs
from Preferences > Team > Git > History
. This should do the job.

Guillaume Darmont
- 5,002
- 1
- 23
- 35
1
ORIG_HEAD and FETCH_HEAD are symbolic refs. They simply record the sha1 of the last Origin and the last Fetch.
In one sense they are an implementation detail, but because of the scriptability of Git on Linux they can be used to provide extra power user capability.
As you delve further into the manual and tutorials you will appreciate what they can do for you (usually when you made some mistake and these refs remember an important state that you can go back to)

Philip Oakley
- 13,333
- 9
- 48
- 71