Re: git overnight process

"Craig A. Berry" <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
On Oct 03, 2012, at 10:31 AM, "James K. Lowden" <[email protected]> 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.

_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.