Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9128791
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:35:53+00:00 2026-06-17T07:35:53+00:00

Git newb question here. Coming from SVN, where I can have multiple branches checked

  • 0

Git newb question here. Coming from SVN, where I can have multiple branches checked out all of the place (“/www/project1”, “/users/project2”, etc.) but all live in the same repository. Each branch has it’s own commits, revisions, etc. You guys know the deal.

Is there a similar method to this in Git, where you can have directories/branches in a single repo spread out all over place? Again, sorry for the newb question. Trying to get a bead on this. Thanks a bunch for any insight that can be provided here.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T07:35:54+00:00Added an answer on June 17, 2026 at 7:35 am

    Normally, as checkout and merging process are really fast, developers using Git keep all branches and just switch between them in the same folder. The SVN branching system is very slow, and not really good, that’s why they usually kept them in a different folder.

    It is possible to checkout a branch to a different folder:

    git --work-tree=<path to target> --git-dir="<path from source>" checkout <reference-name>
    # example:
    git --work-tree=. --git-dir="/base-repo/.git" checkout master
    

    Note, though, that this new folder won’t be versioned. To keep it versioned, you could re-clone the repo in another folder:

    git clone path/to/local/repo/.git
    

    Note that in git, each clone is the full repo (the exact same thing there is on your server and in your other folder). Each clone is completely independent and can push/pull from any other repo.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

git log lists all commits, from all branches that have been merged into HEAD.
I'm somewhat of a git newb so please bear with me here. I have
git-cherry lets me find all the commits missing from upstream. How do I find
Git newbie here. I am probably making a simple mistake here, but I can't
Git, Mercurial, and Bazaar all seem to have similar formats for their ignore file
git newbie in here. I had 2 branches a and b in my local
git version 1.7.3.5 I have the following branches: git branch image master * video
Git is allowing me to change branches when I have changes not staged for
Git can host multiple DAGs in the same repo with git checkout --orphan command.
Git noob here. Having a hard time figuring out why git shows some files

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.