Re: git wants to commit more files than expected ?
- In reply to: Nuno Teixeira : "Re: git wants to commit more files than expected ?"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 13 Aug 2022 15:55:49 UTC
*** `git reset --hard HEAD^` Nuno Teixeira <eduardo@freebsd.org> escreveu no dia sábado, 13/08/2022 à(s) 16:45: > Hi, > > I always forgot to use `git commit --amend` when commit needed some > correction/change. I usually do a `git reset --hard ^HEAD` and then commit > from scratch :) > > Next commit I do I will use amend and see if I got similar problem like > yours. > > Cheers, > > Kurt Jaeger <pi@freebsd.org> escreveu no dia sábado, 13/08/2022 à(s) > 16:27: > >> 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 >> >> > 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! >> >> -- >> pi@FreeBSD.org +49 171 3101372 Now what ? >> >> > > -- > Nuno Teixeira > FreeBSD Committer (ports) > -- Nuno Teixeira FreeBSD Committer (ports)