On Windows, can we put different folders in 1 Git or Mercurial (hg) repository?

On Windows, can we put different folders in 1 Git or Mercurial (hg) repository?

Such as putting

  • Recommended DVCS mechanism for hosting many independent patches
  • How to restore shelved changes in Intellij when the shelf tab is not shown?
  • Unification of DVCS commands
  • One word to summarize Git and other DVCS
  • Git under windows: MSYS or Cygwin?
  • git found out number of conflicts / list of conflicts in working folder
  • c:\ror
    c:\software projects\ruby
    c:\js test
    d:\peter_website
    

    all in 1 Git or Mercurial repository called code ?

  • How do I fix these spurious git commits?
  • What are the difference between these 3 .gitignore entries?
  • git rebase remote, but keep changes locally for later commit
  • Gerrit with Github
  • How do I simply branch/copy master and upload this branch to GitHub?
  • Could I change my name and surname in all previous commits?
  • One Solution collect form web for “On Windows, can we put different folders in 1 Git or Mercurial (hg) repository?”

    No, this is not directly possible. What you could do is making seperate repositories for each dir and then combine them as submodules in another repository.

    I would advise to keep a repository about one project only. If these three dirs are for the same project, you might considering using a better directory structure for them.

    Git Baby is a git and github fan, let's start git clone.