Not a git repository (or any of the parent directories): .git

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,如需转载请自行联系原作者
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值