teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

3

誤字を修正しました

2021/02/13 09:24

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -3,9 +3,8 @@
3
3
 
4
4
  具体的には`git commit -a xxx.html`と入力すると「fatal: paths 'xxx.html ..." with -a does not make sense」と表示され`git commit -am "Change file`と入力すると「nothing added to commit but untracked files present」とエラーが表示されます。
5
5
 
6
+ `git status`の状態は以下です。
6
7
  ```Git
7
- `git status`の状態は以下です。
8
-
9
8
  On branch master
10
9
 
11
10
  No commits yet

2

git statusの状態について追記しました

2021/02/13 09:24

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -3,4 +3,18 @@
3
3
 
4
4
  具体的には`git commit -a xxx.html`と入力すると「fatal: paths 'xxx.html ..." with -a does not make sense」と表示され`git commit -am "Change file`と入力すると「nothing added to commit but untracked files present」とエラーが表示されます。
5
5
 
6
+ ```Git
7
+ `git status`の状態は以下です。
8
+
9
+ On branch master
10
+
11
+ No commits yet
12
+
13
+ Untracked files:
14
+ (use "git add<file>..." to include in what will be committed)
15
+ xxx.html
16
+
17
+ nothing added to commit but untracked files present(use "git add" to track)
18
+ ```
19
+
6
20
  そこで質問なのですがaddとcommitを同時に実行して変更コメントも残す方法があればアドバイスをいただけないでしょうか?

1

エラー表示について詳しく更新しました

2021/02/13 09:23

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -1,4 +1,6 @@
1
1
  Gitをしばらく利用しているとaddとcommitを同時に実行したいと考えました。
2
- 調べてみると`git commit -a xxx.html`や`git commit -am "Change file"`のような記述をネットで見つけたのですが、どちらを実行しても「nothing add to commit」と表示され上手くいきません。
2
+ 調べてみると`git commit -a xxx.html`や`git commit -am "Change file"`のような記述をネットで見つけたのですが、どちらを実行しても上手くいきません。
3
3
 
4
+ 具体的には`git commit -a xxx.html`と入力すると「fatal: paths 'xxx.html ..." with -a does not make sense」と表示され`git commit -am "Change file`と入力すると「nothing added to commit but untracked files present」とエラーが表示されます。
5
+
4
6
  そこで質問なのですがaddとcommitを同時に実行して変更コメントも残す方法があればアドバイスをいただけないでしょうか?