How to push a new folder (containing other folders and files) to an existing git repo?

后端 未结 2 1303
闹比i
闹比i 2020-12-23 12:40

I cloned a repository to my desktop machine using git clone sshurl. As expected, this created a folder in my desktop.

Now, instead of a single file, I w

相关标签:
2条回答
  • 2020-12-23 12:57

    You can directly go to Web IDE and upload your folder there.

    Steps:

    1. Go to Web IDE(Mostly located below the clone option).
    2. Create new directory at your path
    3. Upload your files and folders

    In some cases you may not be able to directly upload entire folder containing folders, In such cases, you will have to create directory structure yourself.

    0 讨论(0)
  • 2020-12-23 12:58

    You need to git add my_project to stage your new folder. Then git add my_project/* to stage its contents. Then commit what you've staged using git commit and finally push your changes back to the source using git push origin master (I'm assuming you wish to push to the master branch).

    0 讨论(0)
提交回复
热议问题