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

質問編集履歴

2

状態の追記2

2018/05/26 14:17

投稿

yuki0000
yuki0000

スコア12

title CHANGED
File without changes
body CHANGED
@@ -17,7 +17,7 @@
17
17
  なお、.gitignoreはこのディレクトリには存在しません。
18
18
 
19
19
  ---
20
- <追記>
20
+ <追記1>
21
21
 
22
22
  $ git ls-files
23
23
  directory1
@@ -46,4 +46,26 @@
46
46
 
47
47
  no changes added to commit
48
48
 
49
- という結果が出ます。
49
+ という結果が出ます。
50
+
51
+ ---
52
+ <追記2>
53
+ ```ここに言語を入力
54
+ $ rm -rf directory1/.git
55
+ ```
56
+ としても、
57
+ ```ここに言語を入力
58
+ $ git ls-files
59
+ directory1
60
+ $ git add .
61
+ $ git commit
62
+ ブランチ master
63
+ nothing to commit, working directory clean
64
+ ```
65
+ と先ほどと結果は変わりませんでした。
66
+ ちなみに、homeの中にdirectory1, .gitがある状態で、
67
+ ```ここに言語を入力
68
+ $ cd home
69
+ $ git add directory1
70
+ ```
71
+ などとしています。

1

状態の追記

2018/05/26 14:17

投稿

yuki0000
yuki0000

スコア12

title CHANGED
File without changes
body CHANGED
@@ -14,4 +14,36 @@
14
14
 
15
15
  どうすればdirectory1の中身を含めてgit pushできるでしょうか。
16
16
 
17
- なお、.gitignoreはこのディレクトリには存在しません。
17
+ なお、.gitignoreはこのディレクトリには存在しません。
18
+
19
+ ---
20
+ <追記>
21
+
22
+ $ git ls-files
23
+ directory1
24
+ $ git status ignored
25
+ ブランチ master
26
+ nothing to commit, working directory clean
27
+
28
+ となります。
29
+
30
+ $ cd directory1
31
+ とすると
32
+ $ git ls-files
33
+ file1 file2 file3 directory1 directory2 directory3 ...
34
+
35
+ とdirectory1内のファイル、ディレクトリが表示されます。
36
+
37
+ $ cd directory1
38
+ $ git add .
39
+ $ cd ..
40
+ $ git commit
41
+ とすると、
42
+
43
+ ブランチ master
44
+ Changes not staged for commit:
45
+ modified: directory1 (modified content)
46
+
47
+ no changes added to commit
48
+
49
+ という結果が出ます。