cURL / Mailing Lists / curl-library / Single Mail


Re: git advice needed

From: Kamil Dudka <>
Date: Wed, 7 Aug 2013 15:38:14 +0200

On Wednesday 07 August 2013 14:49:14 John E. Malmberg wrote:
> I have been using git-patch to submit changes and then after those
> changes are committed, I want to update my local git copy with the
> current state of the curl git repository.
> With svn, all I have to do is an "svn update".
> With git, if I do a git-pull, it usually errors out because it either
> claims my local changes would be overwritten by merge or it claims that
> there are conflicts that the automatic merge can not resolve.
> When I try to see what the conflicts are, there are no visible
> differences in the files. I do not know if that is a feature of the
> cygwin implementation of git or what.
> What is the best way for me to get my local git repository to reflect
> the current trunk?
> The work around that I have is to:
> git merge --abort
> git reset HEAD^ --soft
> git reset HEAD $list-of-changed-files
> rm $list-of-changed-files
> git checkout $list-of-changed-files

In case you have no local changes you care about, just hard-reset your local
branch to the current upstream:

$ git fetch origin
$ git reset --hard origin/master

If you have some local changes you want to preserve, it would be better to
commit them first and then merge or rebase your local branch against upstream.

List admin:
Received on 2013-08-07