From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: "Russell, Scott" <Scott.Russell2@ncr.com>
Cc: "Randall S. Becker" <rsbecker@nexbridge.com>,
'Emily Shaffer' <emilyshaffer@google.com>,
"git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: pull failed - why should I receive this message.
Date: Fri, 24 Sep 2021 20:03:39 +0000 [thread overview]
Message-ID: <YU4vG0TI+BkK6xiW@camp.crustytoothpaste.net> (raw)
In-Reply-To: <BN6PR15MB14262C7036B3C792CCE861D8CBA49@BN6PR15MB1426.namprd15.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 1701 bytes --]
On 2021-09-24 at 18:36:51, Russell, Scott wrote:
> Randall,
>
> Thanks for your answer. However, this is a build system.
> Git clean -dxf would delete all untracked files - not just the conflicted ones.
>
> We must keep all untracked files that would not be conflicted by the pull.
> Otherwise, the result would be our build would need to do a fresh build of all objects and build targets - those are all untracked as well.
> Instead of the desired case of just building the changed files and their resultant targets.
Note that a "git clean -dxf" will clean even ignored files. If you just
need to clean untracked files, you can do "git clean -df" (without the
-x) and then your ignored files will not be deleted.
> We just need the pull to overwrite any untracked files that may exist in conflict with newly tracked files.
>
> I see git is troublesome in this situation. Every time a developer adds an untracked file to the repo - regardless of type,
> It will result in failure of the pull. And a failure of the build.
I do strongly agree with Emily that build artifacts should not be
tracked in the repository and that the best way to solve it is to
address that problem.
However, if your goal is to just update the working tree to a specific
revision, rather than to potentially merge that commit into the working
directory, you can use "git fetch origin" to fetch the remote, and then
use "git checkout -f REVISION" to check out the branch and destroy local
changes. I suspect in your case, since this is a build server, that
checking out a specific revision is the intended behavior.
--
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
next prev parent reply other threads:[~2021-09-24 20:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-24 14:48 pull failed - why should I receive this message Russell, Scott
2021-09-24 17:28 ` Emily Shaffer
2021-09-24 17:34 ` Russell, Scott
2021-09-24 18:00 ` Randall S. Becker
2021-09-24 18:36 ` Russell, Scott
2021-09-24 18:39 ` Emily Shaffer
2021-09-24 18:52 ` Russell, Scott
2021-09-24 20:03 ` brian m. carlson [this message]
2021-09-24 20:13 ` Russell, Scott
2021-09-24 20:45 ` brian m. carlson
2021-09-24 20:49 ` Russell, Scott
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YU4vG0TI+BkK6xiW@camp.crustytoothpaste.net \
--to=sandals@crustytoothpaste.net \
--cc=Scott.Russell2@ncr.com \
--cc=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=rsbecker@nexbridge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox