Uh oh! I accidentally linked a new project to an existing project's git repo!

Knowledge Drop

Last tested: Mar 31, 2020
 

Accidents happen. This one's happened a few times: A user has a project A connected to a git repo, they create a new project B and mistakenly link it to the same remote git repo. How can they split these projects back up? Unfortunately the fix here will be a bit manual.

  • First thing is to make sure you have a second remote repository ready for project B.
  • Point project B at the new repo - if the code from project A has already been synced into project B from the mistakenly shared remote repo, then you will need to manually delete the files from project A. Then, push project B to remote - this will push to the new project.
  • Now, you need to get project B files out of project A. Manually delete these from project A and push these changes - this will push to the original git repo.

This content is subject to limited support.                

Version history
Last update:
‎05-25-2021 08:49 PM
Updated by: