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

后端 未结 2 1324
闹比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: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).

提交回复
热议问题