質問編集履歴

1

質問に追記をした

2018/08/22 10:53

投稿

taro_nii_chan
taro_nii_chan

スコア207

test CHANGED
File without changes
test CHANGED
@@ -167,3 +167,63 @@
167
167
 
168
168
 
169
169
  (*1)だけがおかしいのであれば、どう直したら解決するのか、それともそもそもその前から間違ってるのか教えて下さい。
170
+
171
+
172
+
173
+ # 追記 2018.8.22(wed) 19:53
174
+
175
+ (*1)を省いて`git remote`をしたのですが、指定の仕方が恐らく間違っていてエラーになります。
176
+
177
+
178
+
179
+ ```
180
+
181
+ $ git remote add origin (username)@(servername).xrea.com:(username)/git/some.web.site ...(*3)
182
+
183
+ ```
184
+
185
+ とした後、
186
+
187
+ ```
188
+
189
+ $ git push
190
+
191
+ ```
192
+
193
+ をすると
194
+
195
+ ```
196
+
197
+ fatal: The current branch master has no upstream branch.
198
+
199
+ To push the current branch and set the remote as upstream, use
200
+
201
+
202
+
203
+ git push --set-upstream origin master
204
+
205
+ ```
206
+
207
+ と出て、言われた通り
208
+
209
+ ```
210
+
211
+ $ git push --set-upstream origin master
212
+
213
+ ```
214
+
215
+ を実行すると
216
+
217
+ ```
218
+
219
+ error: src refspec master does not match any.
220
+
221
+ error: failed to push some refs to '(username)@(servername).xrea.com:(username)/git/some.web.site'
222
+
223
+ ```
224
+
225
+ と怒られます。
226
+
227
+
228
+
229
+ (*3)が間違っていると想像しているのですが、どう直せば良いのでしょうか?