Skip to Content.
Sympa Menu

freetds - Re: [freetds] git overnight process

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Craig A. Berry" <craigberry AT mac.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Cc: freetds AT lists.ibiblio.org
  • Subject: Re: [freetds] git overnight process
  • Date: Wed, 03 Oct 2012 18:05:29 +0000 (GMT)


On Oct 03, 2012, at 10:31 AM, "James K. Lowden" <jklowden AT freetds.org> wrote:


error: Your local changes to 'configure.ac' would be overwritten by
merge. Aborting. Please, commit your changes or stash them before you
can merge. Updating 1358a48..f72aa29
*** Error code 1

Stop.
[failure]

What I want is the equivalent of "svn revert", to return all files in
the working directory to their state in the repository. I don't really
want "git stash" but I guess maybe "git stash clear" might work?

Alternatively, I could "rm configure.ac" and let "git pull" recover it
for me.

git reset --hard origin/master

should do the trick assuming you want to throw away local changes to
configure.ac and get into exactly the same state as the remote repository.
git pull would not recover those changes unless the remote already has them
(is that what happened here?).

If you have local changes you want to keep, the easiest thing is to commit
them and then do:

git pull --rebase

which does a rebase instead of a merge under the hood so that your local
commits are set aside while getting in synch with the remote and then
reapplied.

If you have local changes that you really don't want to commit yet for some
reason, then I think you will have to look into git stash.





Archive powered by MHonArc 2.6.24.

Top of Page