Save your old buggy code as a souvenir (git history included)
- Create new repository for arhive your projects.
- Create a personal access token (not the default GitHub Actions token) using
the instructions
here.
Personal access token must have permissions:
read:user
andrepo
. Copy the access token when it is generated – if you lose it, you will have to regenerate the token. - Fork this project
- If this is the README of your fork, click this link to go to the "Secrets" page. Otherwise, go to the "Settings" tab of the newly-created repository and go to the "Secrets" page (bottom left).
- Create 5 secrets:
- ARCHIVED_REPOSITORY - please add username/projectName for saving to arhive repo
- ARCHIVE_REPOSITORY - real arhive repo, format username/projectName (from step 0.)
- ARCHIVE_REPOSITORY_DEFAULT_BRANCH - main or master - default branch in archive repo
- GIT_USERNAME - your username at Github for pushing to arhive repo
- WRITE_GITHUB_TOKEN - your github api token from step 1.
- Open Actions > archivist and press 'Run workflow'
- Enjoy!
My arhive repo: setnemo/arhive
Bygone create new folder like username/projectName/branchName and save all branches with git history.
Just update ARCHIVED_REPOSITORY to another repo and run workflow again
MIT License, Artem Pakhomov, 2021