Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
added 591 characters in body
Source Link
user2588666
  • 851
  • 1
  • 7
  • 16

I have a rather unique situation:

  • I have a repository called Project1 that I worked on for a few months months.
  • A year later, I created the repository Project1_Again that took took off where Project1 left off.
  • Now, I would like the revision history to be continuous, so I would like them merged together, as if that new repository had never been created.

Is this possible?

To clarify:

Repo: Project1

  • rev1: main.cpp has contents "h"
  • rev2: main.cpp has contents "hello"
  • rev3: main.cpp has contents "hello world"

Repo: Project1_Again

  • rev1: main.cpp has contents "hello world"
  • rev2: main.cpp has contents "hello world again"

My goal is to get Project1's revision history into Project1_Again:

Repo: Project1_Again

  • rev1: main.cpp has contents "h"
  • rev2: main.cpp has contents "hello"
  • rev3: main.cpp has contents "hello world"
  • rev4: main.cpp has contents "hello world again"

I have a rather unique situation:

  • I have a repository called Project1 that I worked on for a few months.
  • A year later, I created the repository Project1_Again that took off where Project1 left off.
  • Now, I would like the revision history to be continuous, so I would like them merged together, as if that new repository had never been created.

Is this possible?

I have a rather unique situation:

  • I have a repository called Project1 that I worked on for a few months.
  • A year later, I created the repository Project1_Again that took off where Project1 left off.
  • Now, I would like the revision history to be continuous, so I would like them merged together, as if that new repository had never been created.

Is this possible?

To clarify:

Repo: Project1

  • rev1: main.cpp has contents "h"
  • rev2: main.cpp has contents "hello"
  • rev3: main.cpp has contents "hello world"

Repo: Project1_Again

  • rev1: main.cpp has contents "hello world"
  • rev2: main.cpp has contents "hello world again"

My goal is to get Project1's revision history into Project1_Again:

Repo: Project1_Again

  • rev1: main.cpp has contents "h"
  • rev2: main.cpp has contents "hello"
  • rev3: main.cpp has contents "hello world"
  • rev4: main.cpp has contents "hello world again"
edited tags
Link
Daenyth
  • 37.8k
  • 15
  • 92
  • 131
Source Link
user2588666
  • 851
  • 1
  • 7
  • 16

How to merge two sequential git repositories

I have a rather unique situation:

  • I have a repository called Project1 that I worked on for a few months.
  • A year later, I created the repository Project1_Again that took off where Project1 left off.
  • Now, I would like the revision history to be continuous, so I would like them merged together, as if that new repository had never been created.

Is this possible?