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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T09:27:41+00:00 2026-06-01T09:27:41+00:00

So if I have a Git repo on my local machine and I send

  • 0

So if I have a Git repo on my local machine and I send it to a friend. He creates a branch (or maybe he doesn’t – I don’t think it’s too important), does some work and sends it back to me. Now I have two repos: mine, which I have also been working on; and his, with a new branch which he has been working on.

How do I get it all back together!?

  • 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-01T09:27:42+00:00Added an answer on June 1, 2026 at 9:27 am

    How are you “sending it to a friend”? Git has built-in ways of sharing things, if you’re simply copying the repo you’re making this harder on yourself than it needs to be.

    If you have a second copy of the repo from your friend on your local file system, and you want to merge from it, you can set it as a “remote”:

    $ git remote add other-repo /path/to/other/repo
    

    Now you have a remote named other-repo pointing at the copy of your repo, and you can fetch the changes your friend made, making your original repo aware of them:

    $ git fetch other-repo
    

    Now that your original repo knows about the branches in other-repo, you can merge them in:

    $ git checkout master
    $ git merge other-repo/master
    

    Your master branch will now contain the changes your friend made in other-repo‘s master branch.

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

Sidebar

Related Questions

thanks for any help. I have a git repo on my local machine (mac
I accidentally deleted a few files from my local git repo. I have not
I have a git repo with a dev and a master branch. Now I
I have a local git repo created by Qt Creator during the New Project
I have around 50 relevant commits on my local git repo, of this list
I have my Git repo on my machine, which has no public IP of
I'd like to have git automatically push local changes to the upstream subversion repo
I have a Git repository on my local machine that I cloned from my
I have setup a local git on my machine. When I initialized git, I
Suppose I have Git repository like this: git-repo/ directory_1/ directory_2/ directory_3/ This has a

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.