Re: Issue with git add

From: Philip Paeps <philip_at_freebsd.org>
Date: Wed, 18 Sep 2024 14:29:15 UTC
On 2024-09-18 22:00:56 (+0800), Alexander Leidinger wrote:
> git add doesn't add files. And I don't see them in git status:
> ---snip---
> Mittwoch, 18. September 2024, 15:03:11
> {0} <FreeBSD 15.0-CURRENT> [commit:~/FreeBSD/GIT/ports]
> (256) netchild@ttypts/2 % export LC_ALL=C
>
> Wednesday, 18. September 2024, 15:03:18
> {0} <FreeBSD 15.0-CURRENT> [commit:~/FreeBSD/GIT/ports]
> (257) netchild@ttypts/2 % git apply 
> /tmp/0001-www-lua-resty-session3-new-port-sticking-to-version-.patch


This creates a commit.

> Wednesday, 18. September 2024, 15:03:24
> {0} <FreeBSD 15.0-CURRENT> [commit:~/FreeBSD/GIT/ports]
> (25😎 netchild@ttypts/2 % git add www/lua-resty-session3  
> www/lua-resty-session3/*

Does git status before git add show any modified files?

> Wednesday, 18. September 2024, 15:03:41
> {0} <FreeBSD 15.0-CURRENT> [commit:~/FreeBSD/GIT/ports]
> (259) netchild@ttypts/2 % git status
> On branch main
> Your branch is ahead of 'freebsd/main' by 1 commit.
>   (use "git push" to publish your local commits)

Try git show.  You might want git reset.  Or git commit --amend.

> What's wrong here?

Nothing.  Probably. :-D

Philip