-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chngeset: updates on scripts + workflows
- Loading branch information
ADMSK\AVROGAL1
committed
Jan 22, 2021
1 parent
bfe84af
commit c0e6efc
Showing
5 changed files
with
62 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Repositories: How to move content from one repository to another one | ||
|
||
## Goal | ||
|
||
The content from the source repository should keep the Git history. | ||
|
||
## Steps | ||
|
||
1. Create a new repository with the content to move: | ||
``` | ||
git clone git@github.com:AlexRogalskiy/<source-repository>.git | ||
cd <source-repository> | ||
git-filter-repo --path <path-to-extract> \ | ||
--path <path-to-extract> \ | ||
--path <path-to-extract> \ | ||
... | ||
``` | ||
2. Publish that new repository | ||
3. Add it as a remote repository to the target repository: | ||
``` | ||
git clone git@github.com:AlexRogalskiy/<target-repository>.git | ||
cd <target-repository> | ||
git remote add new-content <url> | ||
git fetch new-content | ||
``` | ||
4. Merge the extracted content: | ||
``` | ||
cd <target-repository> | ||
git merge --allow-unrelated-histories new-content/master | ||
# (adapt the content if it's necessary) | ||
git push origin master | ||
``` | ||
5. Remove the published repository (step 2) | ||
6. Create a pull request into the source repository to remove the extracted content |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters