Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Dec 2020 11:32:59 +0000
From:      Steve O'Hara-Smith <steve@sohara.org>
To:        freebsd-questions@freebsd.org
Cc:        Matthias Apitz <guru@unixarea.de>
Subject:   Re: Where can I find the new git repository?
Message-ID:  <20201226113259.84b4389effd0ee1f05433e62@sohara.org>
In-Reply-To: <X%2BcX6egJSEHI2u1c@c720-r368166.fritz.box>
References:  <CADnZ6B=kwXjRMcg-vvunBN5Gms4dvK2XsO4E2qe_vWTXB%2B64Ew@mail.gmail.com> <5fe5917a.1c69fb81.b9a27.9006SMTPIN_ADDED_MISSING@mx.google.com> <CADnZ6Bm5Zt1ioyC_n=XciYOXY_uGfJtqLbiniAd-JtLM2PfEOA@mail.gmail.com> <8b1fbcaa-2e09-d2e4-03eb-1bbffcada788@yuripv.dev> <X%2BXmU5ChmB2Q7R%2BN@c720-r368166.fritz.box> <CADnZ6B=KRKMUxFk=wTtuHBDiLfU6Y_dGUE9d-RVQc=gXHPX7Pg@mail.gmail.com> <X%2BXvmFpGdw9iReU%2B@c720-r368166.fritz.box> <CADnZ6BnzcDGOx2OeekSONV3__8OUp8zg1Vg2ZtZPEsJRfxUWdw@mail.gmail.com> <X%2BcX6egJSEHI2u1c@c720-r368166.fritz.box>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 26 Dec 2020 12:00:57 +0100
Matthias Apitz <guru@unixarea.de> wrote:

> $ cd freebsd-src
> $ git diff
> 
> It does not show any diffs against the upstream head. I think, it does
> not go even to Internet with this command. If I locally modify a file,
> the diff is shown.

	Yep that is how git works it is a distributed version control
system so diff is between your checked out copy and the branch in your
repository. The basic interactions with remote repositories are just fetch
and push.

	To collect changes from upstream use git fetch to fetch them
and integrate them into your local branch use git pull (which combines a
fetch and merge into your local repository).

	After a fetch you can compare what has been fetched with your
local branch (git diff origin:<branch> or git diff FETCH_HEAD) before
merging the changes in if you wish.

	I prefer to keep my copies of upstream branches pristine and create
branches off them to do my work in. That way when I pull it's always just a
fast forward and I get to deal with any conflicts in the working branch(es)
when I rebase them. Also it makes it easy to separate multiple streams of
work. Branching in git is extremely cheap and so just as ZFS encourages
free use of filesystem boundaries git encourages free use of branching.

-- 
Steve O'Hara-Smith <steve@sohara.org>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20201226113259.84b4389effd0ee1f05433e62>