curl-library
Re: git advice needed
Date: Wed, 7 Aug 2013 15:27:52 +0200
On Wed, Aug 07, 2013 at 07:49:14AM -0500, 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.
What is git-patch? AFAIK it's not a standard git tool. I suggest you use
git format-patch for generating patches.
>
> With svn, all I have to do is an "svn update".
Users of centralized VCSes will need to unlearn a number of habits in
order to learn git. svn update works because you're on the same branch
as the server. In the git world there's no such thing, there's just two
repositories with two different branches.
>
> 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.
You should use a topic-branch for your work you want to submit to curl
and then you should do a git pull on you master branch. And you should
rebase your topic-branch onto your new master.
If you just using master you should rebase your master onto
origin/master. For a detailed discussion of the dis-/advantages
of merge and rebase, and when to best use which, see:
https://coderwall.com/p/ny1hia -- and here's how Linus explains which
one to use:
http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg39091.html
>
> 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.
It's probably a problem with lineendings (I guess you're on a windows
platform). See:
https://help.github.com/articles/dealing-with-line-endings
>
> What is the best way for me to get my local git repository to
> reflect the current trunk?
>
There's no trunk, you really should read the book:
There are several good books available about git; 'Pro Git' is probably
the best: http://git-scm.com/book
Trying to apply a svn-workflow and mindset on git is really confusing
and you seem to miss the basic idea behind git.
Good places to get help can be found here:
http://git-scm.com/community
-- Med vänliga hälsningar Fredrik Gustafsson tel: 0733-608274 e-post: iveqy_at_iveqy.com ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2013-08-07