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

  • Home
  • SEARCH
  • 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 6700779
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:51:20+00:00 2026-05-26T06:51:20+00:00

I have two directories, A & B, which differ very little in their content.

  • 0

I have two directories, A & B, which differ very little in their content. A is already init’d into a git repo and has a number of local commits to its master branch. Directory B is not under SCM and it’s basically just the result of manually copying all the files over from A (sans the .git directory), editing some of them, and adding some new ones. Now I want to make the contents of B a branch of the repo in A and, if possible, still host development of the new branch in directory B… but I have no idea how to accomplish that as I am a total git n00b, and don’t quite yet understand its approach to SCM enough to find the answer on my own in the documentation. Any tips/pointers? 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-05-26T06:51:21+00:00Added an answer on May 26, 2026 at 6:51 am

    copy A/.git into B/.git. Then do what you normally would do for the branching.

    cd B
    git branch dev
    git commit -a
    

    You can then sync changes like this:

    cd A
    git pull ../B dev
    

    or the other way around.

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

Sidebar

Related Questions

I have two sub-directories each with a repo, thus : PPP/ |--ABC/ | |--.git/
I have two directories within my codeigniter controller. /controllers/admin/ dashboard.php content.php enquiries.php /controllers/members/ profile.php
I have two directories containing source files to a project I've inherited with little
I have an installer which installs about 40 files and two directories. This installer
I have two directories which are different versions of the same software package. I'd
I have two or more directories which contains an ample of files. I want
If I have two directories on an nfs server, between which I would like
I have two git working directories. As sometimes happens, I've made some changes in
I have two directories in the same parent directory. Call the parent directory base
Background: We have two directories of Crystal Reports for both the web side of

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.