git pull + src/sharefiles.mk



Robert Dodier <robert.dodier at gmail.com> writes:

> On 8/13/11, Leo Butler <l_butler at users.sourceforge.net> wrote:
>> Barton Willis <willisb at unk.edu> writes:
>>
>>> The files src/share-subdirs.lisp and src/sharefiles.mk are both
>>> automatically
>>> generated (by configure), but doing a pull, git complains about these
>>> files:
>>>
>>> Updating 0c6001a..c8d7c31
>>> Aborting
>>> error: Your local changes to the following files would be overwritten by
>>> merge:
>>> 	src/share-subdirs.lisp
>>> 	src/sharefiles.mk
>>> Please, commit your changes or stash them before you can merge.
>>
>> Barton,
>> I don't think that you want to stash these changes.
>>
>> I generally use magit in emacs as a git front-end, and
>> what I do is kill these changes. The corresponding
>> git command is
>>
>> git --no-pager checkout -- <files>
>>
>> where <files> is the list of files to be reverted.
>>
>> Btw, it is probably best to do
>>
>> git pull --rebase
>>
>> rather than a simple git pull.
>
> I dunno. How are casual users of Git (I believe this includes
> most of the Maxima developers) supposed to know minutiae
> like that?

As I said, I generally use a front-end to git. This
is the best option for casual users imo. I was simply
pulling those commands from the log of magit (the frontend).

> Rebase in particular is significantly different from
> a simple pull; how shall we choose which one?

This has been discussed on this list. 

> Git itself suggests stash, how do we know not to follow the
> recommendation?

IIRC, git makes 2 suggestions and no recommendations. Stash would not be
a wrong option in most cases.  But, as you know in the case of the files
mentioned, they shouldn't really be under vc and one doesn't want to
keep changes made to the local copies.



-- 
Leo Butler                <l_butler at users.sourceforge.net>
SDF Public Access UNIX System -   http://sdf.lonestar.org