小编Dan*_*Dye的帖子

git push to remote后目标目录为空

我正在尝试创建一个远程git仓库(我用该--bare选项初始化)并将一些源文件推送到它.

我有一个本地的git repo和一个裸的遥控器:

ubuntu@ip-LOCAL-IP:~/notebooks$ cat .git/config  
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[branch "master"]
[remote "nbcsm"]
    url = ssh://ubuntu@ec2-RE-DA-CT-ED.compute1.amazonaws.com/home/ubuntu/notebooks/.git
    fetch = +refs/heads/*:refs/remotes/nbcsm/*
Run Code Online (Sandbox Code Playgroud)

我创建了本地仓库:1.2 git init . git add *.ipynb 3.`git commit -m"首次导入IPython笔记本"

然后,我通过使用vi编辑*.ipynb文件然后运行来验证我的本地存储库已跟踪其中的文件git status.git确实看到了更改的文件.

但是,当我执行git push nbcsm master推送似乎成功但我的远程计算机/实例上的目标目录是空的(即它不包含我试图推送到远程的文件):

ubuntu@ip-LOCAL-IP:~/notebooks$ git push nbcsm master
Enter passphrase for key '/home/ubuntu/.ssh/id_rsa': 
Counting objects: 11, done.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 2.49 KiB, done.
Total 9 (delta …
Run Code Online (Sandbox Code Playgroud)

git

5
推荐指数
1
解决办法
1301
查看次数

标签 统计

git ×1