Re: pull failed - why should I receive this message.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux