All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Steve Walker <steve@idibu.com>
Cc: git@vger.kernel.org
Subject: Re: Issue updating files during a checkout from a remote push
Date: Fri, 07 Nov 2008 09:21:55 +0100	[thread overview]
Message-ID: <4913FAA3.3030608@op5.se> (raw)
In-Reply-To: <334B3AB1-125A-4163-BEBC-9A73C4F569B5@idibu.com>

Steve Walker wrote:
> Hi there,
> 
> Hoping someone could point me in the right direction here.
> 
> The overall issue is that with files that have been pushed into our repo 
> on our server, when we then check out into local working copy the new 
> files appear, but the updated files dont update even though the output 
> suggests it has. The flow I'm doing:
> 
> 1. The file I'm testing an update to is this:
> 
> -rw-r--r--   1 root    www-data       0 2008-11-06 16:13 
> steve-git-test3.txt
> 
> 2. On my local box I change file, add it, commit, then push it from my 
> local box to our server repo:
> 
> StevePoota:public_html steve$ vi steve-git-test3.txt
> StevePoota:public_html steve$ git add steve-git-test3.txt
> StevePoota:public_html steve$ git commit
> Created commit e29b724: testing only
>  1 files changed, 1 insertions(+), 0 deletions(-)
> StevePoota:public_html steve$ git push 
> ssh://idibu.com/home/beta_idibu/public_html master:master
> Counting objects: 5, done.
> Compressing objects: 100% (2/2), done.
> Writing objects: 100% (3/3), 272 bytes, done.
> Total 3 (delta 1), reused 0 (delta 0)
> To ssh://idibu.com/home/beta_idibu/public_html
>    a28332a..e29b724  master -> master
> 
> 3. It all looks good, on my server if i do a 'git log' I can see in the 
> latest update:
> 
> oneworld:/home/beta_idibu/public_html# git log
> commit e29b7246beab458d6a7b53cb245a5596adc8c198
> Author: Steve <steve@StevePoota.local>
> Date:   Thu Nov 6 17:55:21 2008 +0100
> 
>     testing only
> 
> 4. So I check out:
> 
> oneworld:/home/beta_idibu/public_html# git checkout master
> M    .gitignore
> M    steve-git-test.txt
> M    steve-git-test2.txt
> M    steve-git-test3.txt
> Already on branch "master"
> oneworld:/home/beta_idibu/public_html#
> 
> and its telling me that file has been modified
> 
> but checking my file it hasnt changed by date stamp, and looking insie 
> the file my changes arent there :((
> 
> -rw-r--r--   1 root    www-data       0 2008-11-06 16:13 
> steve-git-test3.txt
> 
> I'm stumped. I tried 777'ing that file temporarily in case git couldnt 
> write to that file on checkout. What is strange is that when I add new 
> files to the system it works - for example this file I'm testing no was 
> originally added to the server via an external push.
> 
> If anyone could give me some help I'd be very grateful.
> 

git reset --hard master

Note that it's definitely not a good idea to push into a non-bare repo
where you modify the worktree, as the workflow requires that you simply
clobber them (or work on a separate branch and then merge with master,
but then you'll have to know *why* things happen and how to fix them).

You'd probably be better off pushing to another repository and fetching
from that other repo into the non-bare one you're using now.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

  parent reply	other threads:[~2008-11-07  8:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-06 17:04 Issue updating files during a checkout from a remote push Steve Walker
2008-11-06 17:17 ` Steve Walker
2008-11-06 17:53   ` Mark Burton
2008-11-07 21:59   ` Jeff King
2008-11-07  8:21 ` Andreas Ericsson [this message]
2008-11-07 21:56 ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4913FAA3.3030608@op5.se \
    --to=ae@op5.se \
    --cc=git@vger.kernel.org \
    --cc=steve@idibu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.