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,如需转载请自行联系原作者
目录
相关文章
|
5月前
|
存储 前端开发 开发工具
git clone -mirror 和 git clone 的区别
git clone -mirror 和 git clone 的区别
|
8月前
|
开发工具 git 开发者
解决fatal: not a git repository (or any of the parent directories): .git问题
解决fatal: not a git repository (or any of the parent directories): .git问题
1081 1
|
开发工具 git
project is registered as a Git root, but no Git repositories were found there
报错如下 我一开始想把项目推到git,但是发现右键没有git选项。于是我去搜为什么右键没git选项。给出的答案就是在版本控制中添加。 上图这个我添加的本身就是一个git项目,所以没有出现问题,但是如果本身项目还没有关联远程仓库的话,这样搞是会出现问题。
632 0
project is registered as a Git root, but no Git repositories were found there
|
5月前
|
开发工具 git
解决:fatal: not a git repository (or any of the parent directories): .git的问题
解决:fatal: not a git repository (or any of the parent directories): .git的问题
|
12月前
|
Shell 开发工具 git
【Git初探】Git中fatal: Not a git repository (or any of the parent directories): .git错误的解决办法
【Git初探】Git中fatal: Not a git repository (or any of the parent directories): .git错误的解决办法
9683 0
|
开发工具 git
git报错:usage: git remote remove <name>(使用git remote rm origin 报错)
git报错:usage: git remote remove <name>(使用git remote rm origin 报错)
99 0
|
开发工具 git
git报错:‘origin’does not appear to be a git repository
原因 是由于git找不到远端的仓库地址了,在git文件夹下,config文件里配置上即可😎 具体解决方法 记事本打开.git文件夹下的config文件
265 0
git报错:‘origin’does not appear to be a git repository
|
网络安全 开发工具 git
Not a git repository (or any of the parent directories): .git
Not a git repository (or any of the parent directories): .git
195 0
Not a git repository (or any of the parent directories): .git
|
开发工具 git Perl
解决git fatal: No remote repository specified.
解决git fatal: No remote repository specified.
470 0
解决git fatal: No remote repository specified.

相关实验场景

更多