Skip to content

Instantly share code, notes, and snippets.

View mkubdev's full-sized avatar
🌶️

Maxime Kubik mkubdev

🌶️
View GitHub Profile
@mkubdev
mkubdev / Forest.jsx
Created June 17, 2024 13:57 — forked from ektogamat/Forest.jsx
A simple FakeForest Component for React Three Fiber by Anderson Mancini
/*
Copyright(c) June 2024 Anderson Mancini
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@mkubdev
mkubdev / combining-git-repositories.md
Created July 15, 2020 13:10 — forked from msrose/combining-git-repositories.md
How to combine two git repositories.

Combining two git repositories

Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:

  • preserve all commits of both repositories, but replace everything from A with the contents of B, and use rA as your remote location
  • actually combine the two repositories, as if they are two branches that you want to merge, using rA as the remote location

NB: Check out git subtree/git submodule and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.

Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.