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@xxxxxxxxxxxxxxxx>
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@xxxxxx
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html