Aditya J Gupta Aditya J Gupta - 1 year ago 87
Git Question

How to clone a folder on a PC on Github

I'm new to git. I'm finding it hard to figure out how (if possible) can I copy a folder (along with its sub-folders) over to a git repository either using the bash or the web interface while maintaining the folder structure

Answer Source

First you should clone your repository to xxx-subfolder:

git clone <repository-URL> xxx

Now you copy your folder to xxx folder.

Add the folder to git repository:

git add .

Commit the change:

git commit -m "New folder is added"

Push the change to remote git server:

git push
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download