Date: Sat, 26 Sep 2020 02:19:25 +0200 From: Steffen Nurpmeso <steffen@sdaoden.eu> To: Patrick McMunn <doctorwhoguy@gmail.com> Cc: emaste@freebsd.org, freebsd-current@freebsd.org Subject: Re: error pulling from the Beta git repo Message-ID: <20200926001925.BVBKn%steffen@sdaoden.eu> In-Reply-To: <CAKS%2Bcu05Qvoh0pPr7QzJnsY_HUWHMww3cobvZnmgi%2BVtKDvieA@mail.gmail.com> References: <CAKS%2Bcu05Qvoh0pPr7QzJnsY_HUWHMww3cobvZnmgi%2BVtKDvieA@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
Patrick McMunn wrote in
<CAKS+cu05Qvoh0pPr7QzJnsY_HUWHMww3cobvZnmgi+VtKDvieA@mail.gmail.com>:
|I'm using the beta git repo at , and I have been compiling source in that
|directory. Today, when I ran "git pull", it errored out instead of updating
|fully. I don't know if the error was a result of me building in the
|directory, but it seems like a reasonable possibility. It was never an
|issue with SVN, but should I build the source in a separate directory to
|avoid problems with git? I don't know if git keeps a log that I can check
|for the full output. If it does, I'd check if I knew the location. As it
|is, I only have the partial output still present in my terminal window.
$ git clean -fxd [--dry-run]
$ [git reset --hard HEAD]
$ [git fetch -vv]
$ [git gc [--aggressive --prune=all]]
$ git checkout -B local-branch-name origin/branch-name
[Or git update-ref local-branch-name refs/remotes/origin/branch-name]
Alternatively just use a bare repository as a database and several
different checked-out working directories somewhere else.
Btw. the Linux distro i use has a git driver for its ports system,
it goes like that:
cd "$REPOSITORY" 2> "/dev/null"
if [ $? -lt 1 ]; then
git checkout -q "$BRANCH"
git fetch -q
git diff --pretty=format: --name-status "$BRANCH" origin/"$BRANCH" | sed "s/M\t/ Edit /g; s/A\t/ Checkout /g; s/D\t/ Delete /g" | sort
git clean -q -f
git reset -q --hard origin/"$BRANCH"
gc=
else
git clone -q -b "$BRANCH" "$URL" "$REPOSITORY"
ls -1 $REPOSITORY | sed "s/^/ Checkout /"
gc=--aggressive
fi
git gc --quiet $gc --prune=all
That gc stuff is a local addition of mine, i hate stale stuff.
Good night.
--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200926001925.BVBKn%steffen>
