Author identity unknown *** Please tell me who you are. Run git config --global user.email "[email protected]" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: unable to auto-detect email address Gitは問題が起きたときに「こうすれば?」と提案してくれる →エラーメッセージを読む
現在の設定は「-l」で表示できる $ git config -l このオプション「-l」を忘れたのなら、git help configを実行 -l --list List all variables set in config file, along with their values. 上記の記述を見つけ、目的のオプションが「-l」「--list」であることがわかる
commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # On branch main # # Initial commit # # Changes to be committed: # new file: README.md # • コミットメッセージを書け • 行頭に「#」がある行は無視される • 空メッセージならコミットを中断する
Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git restore <file>..." to discard changes in working directory) modified: README.md no changes added to commit (use "git add" and/or "git commit -a") • カレントブランチがmainであり(On branch main) • ステージされていない変更があり(Changes not staged for commit) • その変更とは、README.mdが修正されたものである (modified: README.md) • コミットしたければgit addかgit commit –aを使え 状態表示の簡略版 $ git status -s M README.md ワーキングツリーとインデックスに差異がある
be committed: (use "git restore --staged <file>..." to unstage) modified: README.md 状態を表示する • 「Changes not staged for commit:」→「Changes to be committed:」 • ステージングを取り消すならgit restore --staged しろ 状態表示の簡略版 $ git status -s M README.md インデックスとリポジトリに差異がある