git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git push from client is not updating files on server

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 6, 2012, 20:37 UTC
Message-ID
<7vzkbtqxdo.fsf@alter.siamese.dyndns.org>
In-Reply-To
<CAC0z1F-Eg2DOLvd3aA5XCoEJjj1jC=VWVkTA+uc24=18h3pN7g@mail.gmail.com>
Jerome Yanga <jerome.yanga@gmail.com> writes:

[jc: kicking the thread back to the list; I do not give free consultation in private, but I do not mind answering questions in public to help wider audience.]

Show 12 quoted lines
> Thank you for the prompt response.
>
> The projects in the Apache DocumentRoot are bare repositories.  I
> think this is what allowed me to push at least this is how I
> understood it from the URL I had quoted in my last message.
>
> If I understood what you had said about push being the opposite of
> fetch, then it is understandable that the files on the working
> directory did not get updated and that it only shows in the Gitweb
> interface.
>
> So how do I make the changes go in the working tree?

By arranging a "checkout" to happen when you want to. One common way people seem to do this is to have "git reset --hard HEAD" in post update hook when the push came to the current branch, assuming that nobody but the update in response to "push" is expected to touch the working tree of the receiving repository.

Previous: Neal KreitzingerNext: Jerome Yanga
Message 6 of 15 in “git push from client is not updating files on server”
  1. Jerome YangaMar 6, 2012
  2. Ben TebulinMar 6, 2012
  3. Junio C HamanoMar 6, 2012
  4. Neal KreitzingerMar 6, 2012
  5. Neal KreitzingerMar 6, 2012
  6. Junio C HamanoMar 6, 2012
  7. Jerome YangaMar 6, 2012
  8. Neal KreitzingerMar 6, 2012
  9. Jerome YangaMar 7, 2012
  10. Neal KreitzingerMar 7, 2012
  11. Junio C HamanoMar 7, 2012
  12. Neal KreitzingerMar 7, 2012
  13. Holger HellmuthMar 7, 2012
  14. Jerome YangaMar 7, 2012
  15. Jerome YangaMar 30, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.