Sub folder in Git project?
I have been using Subversion for a long time and now I have switched to Git.
Now I need to know how to get sub folders in my Git project?
I know sombody will make 2 projects for this but I dont need 2 projects for this. I need to clone a subfolder and not my main project.
I use github.com.
4 Solutions collect form web for “Sub folder in Git project?”
When cloning a git repository you always clone the whole repository.
If you want subfolders in your project simply create them though. As soon as you add files inside them (git only tracks files no folders -> if a folder is empty you cannot add it to your repo), they can be committed to your repository by committing the files inside.
Yes, you can! Github also provides SVN access for repositories. For example I want to get Android fonts here:
Just run this command, see the pattern, replace /tree/master with /trunk:
svn checkout https://github.com/android/platform_frameworks_base/trunk/data/fonts
- create a folder
- “git add” this folder
- “git commit -m ‘message'”
- “git push”
I had git 1.5.5, and it requires 1.7+; now I have 1.7 and it’s all working fine. 🙂 But thanks a lot for the answer.