-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Activity 3: Graft a repository #4
Comments
It sounds like that there is the assumption that everything is merged into the |
@TestStefan Very good question! This approach only covers merged changes. Unmerged branches need a special treatment that is outside the scope of this workshop. But we can help with that in a Professional Services session. |
I guess you need to cleanup all active branches and create in the new grafted repository these branches as well and link them back to the archive repository. |
After run the command "git push --set-upstream origin main" I got the fellowing error(I am using windows 10) Please make sure you have the correct access rights Any suggestion to fix it? Thanks |
Any clear instruction for step 1: Clean your repository: how to make it ? If you could provide a video demo using a public example? Many thanks. |
Duration: 20 minutes
Grafting commands
Working with the new repository
To preserve the history while working with the new repository, follow the grafting command:
Check that all the changes that have happened to the repository are local and don't get pushed when new code goes to the repository:
Analysis after grafting
Re-run the command from Activity 2 to analyze the grafted repository.
Stats of repo size:
git-sizer
git-sizer
.Find files that should be in LFS:
git-find-lfs-extensions
grafting-monorepos
repositoryPrint directories with the number of files contained:
git-find-dirs-many-files
grafting-monorepos
repositoryFind dirs that should not be committed:
git-find-dirs-unwanted
grafting-monorepos
repository/path/to/grafting-monorepos/scripts/git-find-dirs-unwanted | head -n 15
Analyze the repository:
git-filter-repo --analyze
git-filter-repo
toolFor examples and more information, please see README.md -> Activity 3.
The text was updated successfully, but these errors were encountered: