Can I commit into specific folders inside a repository in GitHub?

Viewed 15

As a part of my traineeship, I'm supposed to create a single repository for my final projects. Inside that repository I'd have created 3 folders (task, project1, project2).

Since I'm quite new to GitHub, I'm not entirely sure how to achieve that. I know how to create a new repository, but uploading into a specific folder seems extra confusing for a dodo like myself.

Many thanks in advance.

1 Answers

If you create a new repository (github.com/me/myNewRepo), you can:

  • clone it locally
  • cd (change directory) to myNewRepo
  • create your subfolders there (with files in it)
  • add/commit and push

You will see those same subfolders in github.com/me/myNewRepo

(Replace Me by your GitHub user account, and myNewRepo by a more meaningful name)

Related