Switching branches of freebsd-base-graphics with git
Thomas Mueller
mueller6722 at twc.com
Wed Apr 5 07:41:40 UTC 2017
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
More information about the freebsd-x11
mailing list