V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
cys
V2EX  ›  GitHub

关于 Github 的 Push 文件夹功能

  •  
  •   cys · 2015-08-26 09:21:05 +08:00 · 1800 次点击
    这是一个创建于 3169 天前的主题,其中的信息可能已经有所发展或是发生改变。
    假如说在本地创建一个库: repo-example ,在 Github 上也创建了 repo-example ,两个库连接之后,进行 push
    怎样使 push 的库的子文件直接显示在如: github.com/userid/repo-example 下而不是在此连接下的 repo-example 子文件夹中
    如: github.com/userid/repo-example/tree/master/repo-example

    举个例子:
    Push 之后的文件夹结构是这种: https://github.com/daylerees/colour-schemes
    而不是在这个地址下再创建创建一个文件夹 colour-schemes 然后文件都在里面。
    3 条回复    2015-08-26 10:24:48 +08:00
    networm
        1
    networm  
       2015-08-26 09:39:53 +08:00 via iPad
    你在本地创建玩一个 repo-example 目录后,不要在其父目录执行 git init ,而是要进入这个目录执行 git init 然后再推送。
    cys
        2
    cys  
    OP
       2015-08-26 09:47:56 +08:00
    @networm 哈哈,我好像就是在父目录执行的 git init ,我修改试试下。
    cys
        3
    cys  
    OP
       2015-08-26 10:24:48 +08:00
    @networm 哈哈,还真是这样子呢。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3313 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 11:20 · PVG 19:20 · LAX 04:20 · JFK 07:20
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.