Re: git wants to commit more files than expected ?

From: Warner Losh <imp_at_bsdimp.com>
Date: Sat, 13 Aug 2022 15:43:03 UTC
On Sat, Aug 13, 2022 at 9:27 AM Kurt Jaeger <pi@freebsd.org> wrote:

> Hi!
>
> > > But if I run a git commit, additional two files turn up:
> > >
> > > # Changes to be committed:
> > > #       modified:   archivers/py-borgbackup/Makefile
> > > #       new file:   archivers/py-borgbackup/files/patch-setup.py
> > > #       modified:   print/pdf-tools/Makefile
> > > #       modified:   print/pdf-tools/distinfo
> > >
> > > Why isn't git status not reporting the two pdf-tools files,
> > > but git commit is ?
> >
> > Could you share the 'git commit' command-line that you're using ?
>
> It was this:
>
> git commit --amend --author='Jose G. Juanino <jjuanino@gmail.com>'
> archivers/py-borgbackup
>

Yes. this was adding borgbackup to the previously committed thing....


> > If I've to guess then you're probably including the '-a' switch of git
> > commit. If yes, then please don't include it.
>
> I now tried this:
>
> git commit --author='Jose G. Juanino <jjuanino@gmail.com>'
> archivers/py-borgbackup
>
> and it worked! Thanks!
>

This is creating a new commit with borgbackup...

I'll have to check it out... I'm in need of a good, automated backup...

Warner