Re: FETCH_HEAD files and mirrored repos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Konstantin Ryabitsev <konstantin@xxxxxxxxxxxxxxxxxxx> writes:

> Are there any downsides to deleting FETCH_HEAD after performing "git 
> remote update" in repos that are only used for mirrored hosting?

The only time Git itself uses FETCH_HEAD is during "git pull".

"git pull" is a two step process---it first calls "git fetch" and
then calls "git merge" (or "git rebase") to integrate the fetched
history with the history of your current branch.  "git fetch" leaves
what it got in that file, and "git pull" figures out what parameters
and message to use to drive the second step.  After that, FETCH_HEAD
is not used by Git.  If you call "git fetch" yourself, FETCH_HEAD
left by that process is not used by Git itself, but you can use what
is in it to manually execute the second step of what "git pull"
would do.

So, unless your script depends on the presence and/or the contents
of FETCH_HEAD, you can safely remove it.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux