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 8883817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T20:54:32+00:00 2026-06-14T20:54:32+00:00

Apologies for how basic this is..but remotely, I have a master branch and a

  • 0

Apologies for how basic this is..but remotely, I have a master branch and a dev branch I’m working on. I check out the master like this:

git clone https://github...

and I can check out the dev branch like this:

git clone -b my-branch https://github...

Previously, I had both branches cloned locally in the same directory and i could see them listed with

git branch

I acheived this by building the dev branch locally and then pushing it to the server. Then (to experiment) I deleted everything to see if I could recreate the setup whereby I have both the master and my dev branch in the same directory and I could switch between them.

Also, as I develop, I want to check what the dev branch looks like on my local server, and then switch to see what the master branch looks like on my localserver. How is this problem normally solved please? Do I need to have each branch in a seperate directory and start the server in that directory?

Thanks in advance

  • 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-14T20:54:33+00:00Added an answer on June 14, 2026 at 8:54 pm

    If you git clone twice into different locations, well, you don’t really use branching the way it was intended.

    You should git clone just once, and then you can git checkout to whatever branch you want. By default, after git clone, you will have just one local branch (probably master), but you can explore which branches are present on server by git branch -av. You can also checkout to server branch by git checkout --track origin/another-branch – this will create local tracking branch another-branch.

    At any rate, you should really invest some time in reading good git book, for example Progit.

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

Sidebar

Related Questions

Apologies if this is a very basic question, but I am preparing to create
First off, please accept my apologies if this question is basic, I mainly have
Apologies for this basic question, but I am noob stumped. The below code works
I am new to MVC3, so apologies if this is basic, but I couldn't
apologies if this is a basic question but I haven't been able to figure
Apologies if this is overly basic, but I couldn't find much info with my
I'm not experienced in Javascript, so apologies if this is a basic question, but
Apologies for such a basic question but I can't figure it out. I know
Apologies if this is a too basic question but I couldn't find any satisfactory
I'm a newbie so apologies if this is basic but it's been driving me

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.