threads / discuss / 14818

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

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

## tl;dr

2 messages between Aug 3, 2008 and Aug 3, 2008.

replies: 1people: 2as markdown or json

Bruce Korb· Aug 3, 2008, 04:58 UTC · lore

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.

Matt Pearson· Aug 3, 2008, 05:21 UTC · re: Bruce Korb · lore

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

On Sun, Aug 3, 2008 at 12:58 AM, Bruce Korb <bruce.korb@gmail.com> wrote:
Show 8 quoted lines
> 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

← back to recent threads