Publish on GitHub
Since the original repository is on a self-hosted GitLab instance, to publish updates to GitHub, there are several steps necessary:
Terminal (pwsh / bash):
# 1. For a clean setup: Clone the GitLab repository
git clone git@gitlab.uclv.net:energy-research-centre/frameworks/open-ev-fleet.git
# 2. Change into the repository folder
cd open-ev-fleet
# 3. Create and switch to a new branch (branch name: main-github) for the release:
git checkout -b main-github
# 4. Filter the Repository using `git-filter-repo` (removing all files in 'private' folders)
git filter-repo --path-glob '*/private/*' --invert-paths --force
# 5. Add the github repository as a remote (remote name:origin-github)
git remote add origin-github https://github.com/erc-fhv/open-ev-fleet.git
# 6. Push the changes to GitHub (local: main-github to remote origin-github:main)
git push origin-github main-github:main
# 7. (Optional) Switch back to the main branch
git checkout main
# 8. (Optional) Delete the temporary branch
git branch -D main-github
# 9. (Optional) Remove the GitHub remote
git remote remove origin-github