Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: Git Fetch / updating HEAD

From: Johan Herland <hidden>
Date: 2016-06-15 22:49:08

On Saturday 17 July 2010, Mahesh Vaidya wrote:
BTW - I have tried this
git  update-ref HEAD  FETCH_HEAD; is this ok ??

On Sat, Jul 17, 2010 at 9:02 PM, Mahesh Vaidya [off-list ref] 
wrote:
quoted
Hi,

git fetch --all --append updates FETCH_HEAD. I'd like this command to
update HEAD as well; is there any flag ?

I have a reason to do it; trying to implement multisite

A (master) -> B (readonly mirror) -> C (workspace)

if sitting in B; git fetch does't update HEAD
You need to set up special refspecs in your B repo, so that git fetch 
updates refs/heads/* instead of refs/remotes/origin/*. When that is done, a 
simple 'git fetch' will update your branches (and HEAD as a result).

In short, you should create the B repo using 'git clone --mirror' (which 
will set up the correct refspecs for you)


...Johan

-- 
Johan Herland, [off-list ref]
www.herland.net
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help