Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Jun 2022 18:30:17 +0200
From:      Michael Gmelin <grembo@freebsd.org>
To:        Andy Farkas <andyf@andyit.com.au>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: git pull not replicating?
Message-ID:  <15E6ADE4-E6D5-4DF4-983A-699466240C79@freebsd.org>
In-Reply-To: <8ccf0ca5-abdf-9ed4-530d-95e1a59f5108@andyit.com.au>
References:  <8ccf0ca5-abdf-9ed4-530d-95e1a59f5108@andyit.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail-4750FED1-B096-48B7-BF2C-F775B4B194AB
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable



> On 18. Jun 2022, at 15:58, Andy Farkas <andyf@andyit.com.au> wrote:
>=20
> =EF=BB=BF
> If I do a 'git pull' in /usr/ports usually it updates a few files
> and I think 'good, my ports tree is in sync with upstream'. And if
> I do it again shortly afterwards, I get:
>=20
> root:/usr/ports # git pull
> Already up to date.
> root:/usr/ports #
>=20
> Which is also good.
>=20
> But if I do this:
>=20
> root:/usr/ports # mv ftp /root/
> root:/usr/ports # git pull
> Already up to date.
> root:/usr/ports #
>=20
> ..which is obviously false.

Git fetch/pull is about what was pulled into .git (its index, which is all o=
bjects, branches and what not). If you want to get the state of your working=
 directory, use `git status`.

See https://git-scm.com/docs/git-pull

If you want to clean your local workdir, use:

    git clean -fd
    git checkout .

from within your git root directory.

-m

>=20
> Now my belief that I am in sync with upstream is shattered.
>=20
> Is there a git incantation that will make sure my tree is fully
> in sync with upstream?
>=20
> Thanks,
>=20
> -andyf
>=20
> ps.
>=20
> root:/usr/ports # cat .git/config
> [core]
>         repositoryformatversion =3D 0
>         filemode =3D true
>         bare =3D false
>         logallrefupdates =3D true
> [remote "origin"]
>         url =3D https://git.freebsd.org/ports.git
>         fetch =3D +refs/heads/main:refs/remotes/origin/main
> [branch "main"]
>         remote =3D origin
>         merge =3D refs/heads/main
>=20
>=20
>=20

--Apple-Mail-4750FED1-B096-48B7-BF2C-F775B4B194AB
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto"><div dir=3D"ltr"></div><div dir=3D"ltr"><br=
></div><div dir=3D"ltr"><br><blockquote type=3D"cite">On 18. Jun 2022, at 15=
:58, Andy Farkas &lt;andyf@andyit.com.au&gt; wrote:<br><br></blockquote></di=
v><blockquote type=3D"cite"><div dir=3D"ltr">=EF=BB=BF<span></span><br><span=
>If I do a 'git pull' in /usr/ports usually it updates a few files</span><br=
><span>and I think 'good, my ports tree is in sync with upstream'. And if</s=
pan><br><span>I do it again shortly afterwards, I get:</span><br><span></spa=
n><br><span>root:/usr/ports # git pull</span><br><span>Already up to date.</=
span><br><span>root:/usr/ports #</span><br><span></span><br><span>Which is a=
lso good.</span><br><span></span><br><span>But if I do this:</span><br><span=
></span><br><span>root:/usr/ports # mv ftp /root/</span><br><span>root:/usr/=
ports # git pull</span><br><span>Already up to date.</span><br><span>root:/u=
sr/ports #</span><br><span></span><br><span>..which is obviously false.</spa=
n><br></div></blockquote><div><br></div><div>Git fetch/pull is about what wa=
s pulled into .git (its index, which is all objects, branches and what not).=
 If you want to get the state of your working directory, use `git status`.</=
div><div><br></div><div>See&nbsp;<a href=3D"https://git-scm.com/docs/git-pul=
l">https://git-scm.com/docs/git-pull</a></div><div><br></div><div>If you wan=
t to clean your local workdir, use:</div><div><br></div><div>&nbsp; &nbsp; g=
it clean -fd</div><div>&nbsp; &nbsp; git checkout .</div><div><br></div><div=
>from within your git root directory.</div><div><br></div><div>-m</div><br><=
blockquote type=3D"cite"><div dir=3D"ltr"><span></span><br><span>Now my beli=
ef that I am in sync with upstream is shattered.</span><br><span></span><br>=
<span>Is there a git incantation that will make sure my tree is fully</span>=
<br><span>in sync with upstream?</span><br><span></span><br><span>Thanks,</s=
pan><br><span></span><br><span>-andyf</span><br><span></span><br><span>ps.</=
span><br><span></span><br><span>root:/usr/ports # cat .git/config</span><br>=
<span>[core]</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; repo=
sitoryformatversion =3D 0</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp; filemode =3D true</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp; bare =3D false</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp=
;&nbsp; logallrefupdates =3D true</span><br><span>[remote "origin"]</span><b=
r><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; url =3D https://git.freeb=
sd.org/ports.git</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f=
etch =3D +refs/heads/main:refs/remotes/origin/main</span><br><span>[branch "=
main"]</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; remote =3D=
 origin</span><br><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; merge =3D=
 refs/heads/main</span><br><span></span><br><span></span><br><span></span><b=
r></div></blockquote></body></html>=

--Apple-Mail-4750FED1-B096-48B7-BF2C-F775B4B194AB--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15E6ADE4-E6D5-4DF4-983A-699466240C79>