Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Apr 2017 11:05:53 +0200
From:      Andreas Nilsson <andrnils@gmail.com>
To:        Thomas Mueller <mueller6722@twc.com>
Cc:        FreeBSD X11 mailing list <freebsd-x11@freebsd.org>
Subject:   Re: Switching branches of freebsd-base-graphics with git
Message-ID:  <CAPS9%2BSvcSdcALYgRyhdw2oqE93cPUb94pzYsP=BDQQadLXfzmg@mail.gmail.com>
In-Reply-To: <E7.99.29375.6FD94E85@dnvrco-omsmta02>
References:  <E7.99.29375.6FD94E85@dnvrco-omsmta02>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Apr 5, 2017 at 9:33 AM, Thomas Mueller <mueller6722@twc.com> wrote:

> I tried to switch freebsd-base-graphics tree from drm-3.8 (something like
> that, now outdated to drm-next and made a mess.
>
> First, from /freebsd-base-graphics, I did
> git checkout drm-next
> but then git pull didn't work, I got message about not having repository.
>
> "git checkout drm-next"  switched branches but didn't download anything,
> hence my try with "git pull".
>
> After some struggle, I did
> git clone https://github.com/FreeBSDDesktop/freebsd-base-graphics.git -b
> drm-next
>
> from /freebsd-base-graphics directory, but that resuted in the tree being
> downloaded to /freebsd-base-graphics/freebsd-base-graphics
>
> I recovered by renaming (mv) /freebsd-base-graphics to
> /freebsd-base-graphics-old, then moved /freebsd-base-graphics-old/freebsd-base-graphics
> to /
> and then, with the new stuff separated from the old,
> rm -R /freebsd-base-graphics-old
>
> That seemed to work, inelegantly.
>
> Question is how to switch the branch and download the new branch over the
> old, like "svn sw", but with git.
>
> I looked through the documentation, even went to git-scm.org, even a PDF
> book "Jump-Start Git" but still couldn't see what I should have done.
>
> There has to be a simpler way, but I couldn't find it in the documentation
> of git.
>
> Tom
>
> _______________________________________________
> freebsd-x11@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-x11
> To unsubscribe, send any mail to "freebsd-x11-unsubscribe@freebsd.org"
>


Hello!

I've switched branches a few time to keep track of progress and going from
11-STABLE to 12-CURRENT. I did

git fetch ( this fetch info on new branches and code and so on )
git checkout $branch
git pull


Subsequent upgrades are done with

git fetch
git pull

I'm by no means a git expert, so please correct me if I'm wrong.

Best reagards
Andreas



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPS9%2BSvcSdcALYgRyhdw2oqE93cPUb94pzYsP=BDQQadLXfzmg>