回答編集履歴

3

Add second answer

2020/08/09 07:09

投稿

y_shinoda
y_shinoda

スコア3272

test CHANGED
@@ -1,3 +1,69 @@
1
+ ## 追記
2
+
3
+
4
+
5
+ ```console
6
+
7
+ $ git push origin master
8
+
9
+ Enumerating objects: 3, done.
10
+
11
+ Counting objects: 100% (3/3), done.
12
+
13
+ Writing objects: 100% (3/3), 238 bytes | 238.00 KiB/s, done.
14
+
15
+ Total 3 (delta 0), reused 0 (delta 0)
16
+
17
+ remote: GitLab:
18
+
19
+ remote: A default branch (e.g. master) does not yet exist for xxx
20
+
21
+ remote: Ask a project Owner or Maintainer to create a default branch:
22
+
23
+ remote:
24
+
25
+ remote: https://xxxx
26
+
27
+ remote:
28
+
29
+ To リポジトリ.git
30
+
31
+ ! [remote rejected] master -> master (pre-receive hook declined)
32
+
33
+ error: failed to push some refs to 'リポジトリ.git'
34
+
35
+ ```
36
+
37
+
38
+
39
+ そのリポジトリーは `GitHub` ではありません、`GitLab` です
40
+
41
+
42
+
43
+ ```console
44
+
45
+ ! [remote rejected] master -> master (pre-receive hook declined)
46
+
47
+ ```
48
+
49
+
50
+
51
+ GitLab サーバー側で拒絶されています
52
+
53
+ GitLab 管理者に問い合わせてみてください
54
+
55
+ ユーザー権限などにも問題がないか再確認してみてください
56
+
57
+
58
+
59
+ 参考: [Answer: Git error when trying to push — pre-receive hook declined](https://stackoverflow.com/a/7988885/12721873?stw=2)
60
+
61
+
62
+
63
+ ## 元の回答
64
+
65
+
66
+
1
67
  1
2
68
 
3
69
  現在のディレクトリーが

2

Fix command

2020/08/09 07:09

投稿

y_shinoda
y_shinoda

スコア3272

test CHANGED
@@ -34,7 +34,7 @@
34
34
 
35
35
 
36
36
 
37
- ```console
37
+ ```
38
38
 
39
39
  git branch --set-upstream-to=origin/master
40
40
 

1

Fix command

2020/08/09 06:46

投稿

y_shinoda
y_shinoda

スコア3272

test CHANGED
@@ -36,7 +36,7 @@
36
36
 
37
37
  ```console
38
38
 
39
- git branch --set-upstream-to origin master
39
+ git branch --set-upstream-to=origin/master
40
40
 
41
41
  ```
42
42