1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
[root@ip-172-31-22-8 molewanwan]
# git remote add origin git@github.com:molewanwan/demo.git
fatal: Not a git repository (or any of the parent directories): .git
处理方法
[root@ip-172-31-22-8 molewanwan]
# git init
Initialized empty Git repository
in
/home/molewanwan/
.git/
再次git remote add
[root@ip-172-31-22-8 molewanwan]
# git remote add origin git@github.com:molewanwan/demo.git
[root@ip-172-31-22-8 molewanwan]
# ls -la
total 20
drwx------. 3 molewanwan molewanwan 70 Nov 27 07:55 .
drwxr-xr-x. 104 root root 4096 Nov 27 07:43 ..
-rw-r--r--. 1 molewanwan molewanwan 18 Jul 8 2015 .bash_logout
-rw-r--r--. 1 molewanwan molewanwan 193 Jul 8 2015 .bash_profile
-rw-r--r--. 1 molewanwan molewanwan 231 Jul 8 2015 .bashrc
drwxr-xr-x. 7 root root 4096 Nov 27 07:56 .git
[root@ip-172-31-22-8 .git]
# ls -la
total 20
drwxr-xr-x. 7 root root 4096 Nov 27 07:56 .
drwx------. 3 molewanwan molewanwan 70 Nov 27 07:55 ..
drwxr-xr-x. 2 root root 6 Nov 27 07:55 branches
-rw-r--r--. 1 root root 197 Nov 27 07:56 config
-rw-r--r--. 1 root root 73 Nov 27 07:55 description
-rw-r--r--. 1 root root 23 Nov 27 07:55 HEAD
drwxr-xr-x. 2 root root 4096 Nov 27 07:55 hooks
drwxr-xr-x. 2 root root 20 Nov 27 07:55 info
drwxr-xr-x. 4 root root 28 Nov 27 07:55 objects
drwxr-xr-x. 4 root root 29 Nov 27 07:55 refs
|
本文转自 冰冻vs西瓜 51CTO博客,原文链接:http://blog.51cto.com/molewan/1877196,如需转载请自行联系原作者