I've tried to read the manuals, but "git pull" just won't work

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

I've tried to read the manuals, but "git pull" just won't work

Bruce Korb
Sorry, I don't know where else to turn.
I've modified my local copy of ChangeLog and my "git pull" says, "Oh, oh!
You'd overwrite your changes" and refuses to pull.  I tried
"git reset HEAD  ChangeLog", but it says all sorts of crazy things
that make no sense and I'm still stuck.  I know I can fix this:
pull my edits into a patch, throw away my repository, clone a fresh
copy.  There has to be a better way.  The better  way is just too
obtuse to figure out.....Help, please?  Thank you.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Reply | Threaded
Open this post in threaded view
|

Re: I've tried to read the manuals, but "git pull" just won't work

Matt Pearson-3
On Sun, Aug 3, 2008 at 12:58 AM, Bruce Korb <[hidden email]> wrote:
> Sorry, I don't know where else to turn.
> I've modified my local copy of ChangeLog and my "git pull" says, "Oh, oh!
> You'd overwrite your changes" and refuses to pull.  I tried
> "git reset HEAD  ChangeLog", but it says all sorts of crazy things
> that make no sense and I'm still stuck.  I know I can fix this:
> pull my edits into a patch, throw away my repository, clone a fresh
> copy.  There has to be a better way.  The better  way is just too
> obtuse to figure out.....Help, please?  Thank you.

Depends on whether you want to keep the changes you made or not. If
you don't care about the changes, 'git checkout -- ChangeLog' will
remove the local changes. If you want to keep the changes, you can
stash them away with 'git stash', then do the pull, then re-add the
changes (and maybe have to resolve conflicts) with 'git stash apply'.
You could also just commit the changes. If you still can't get it to
work, you're going to have to paste actual program output (the output
from status would probably help).

Matt
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to [hidden email]
More majordomo info at  http://vger.kernel.org/majordomo-info.html