1

I'm looking for a way in Git to add new files to an existing remote repo without having to clone all of it. I have a large repo on Github and I want to add a new folder at its root, but I don't want to clone the remote repo. Is there a way to do that?

Or maybe just clone the structure of the repo to be able to add it to the new folder and then push it?

Hope it's clear enough. I found some similar questions but no satisfying answer. Some directed to submodules, but not sure that's appropriate for me. And even though it says here How do I add file to remote Git repo (Github) without cloning the whole repo first that it can't be done, Im sure there must be a way :)

Thanks.

Community
  • 1
  • 1
David
  • 576
  • 5
  • 12
  • 1
    Possible duplicate of [How do I add file to remote Git repo (Github) without cloning the whole repo first](http://stackoverflow.com/questions/19619450/how-do-i-add-file-to-remote-git-repo-github-without-cloning-the-whole-repo-fir) – Timothy G. Dec 24 '16 at 14:35
  • `Or maybe just clone the structure of the repo` - that's a [shallow clone](https://git-scm.com/docs/git-clone). – AD7six Dec 24 '16 at 14:47

1 Answers1

3

Use web GUI, press button. Or drag and drop to webpage.

enter image description here

Or create a new empty file put inside a folder:

enter image description here

Reference:

https://help.github.com/articles/adding-a-file-to-a-repository/

https://github.com/blog/2105-upload-files-to-your-repositories

Vy Do
  • 46,709
  • 59
  • 215
  • 313