search

Home  >  Q&A  >  body text

github - git creates a repository in another folder?

The code for creating the warehouse is git init
Is this creating a warehouse in an existing folder? How to create a warehouse in another folder?

伊谢尔伦伊谢尔伦2812 days ago703

reply all(4)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-02 09:36:56

    It seems there is no such method, you can just move to another folder and then git initOkay^^

    Added:

    Right click on the Gitbashshortcut key icon and open properties:

    Did you seeStart in:? You can change the default opening path of gitbash by changing this

    reply
    0
  • 仅有的幸福

    仅有的幸福2017-05-02 09:36:56

    Executed in the current foldergit init当前文件就是一个仓库了。其他文件也想建立仓库再到对应的文件夹下执行git init就可以了。这里提一下,每个仓库可以创建不同的分支git branch 分支名

    reply
    0
  • 阿神

    阿神2017-05-02 09:36:56

    If it hadn’t been for the poster asking me, I really don’t know. It’s ok after experimenting. For example, if there is a directory "C:fuck", but the current working directory is not here, you can execute the following command to create a warehouse under "C:fuck":

    git init \c\fuck

    In addition, you can execute git init --helpView the help. This is how I found the answer (at least this is the case under Windows, I have not tried the effect under Linux)

    reply
    0
  • ringa_lee

    ringa_lee2017-05-02 09:36:56

    git init PATH That’s it.

    reply
    0
  • Cancelreply