-
Notifications
You must be signed in to change notification settings - Fork 3
Application Example
Ethan edited this page May 18, 2022
·
2 revisions
To backup/mitigate your Git repository or merge the existing ones, you need to change the git origin to a new URL remote.
git remote set-url <remote_name> <remote_url>: git remote set-url origin git@github.com:Ethanlinyf/Archive-General-Pure-Emacs.git git remote -v
Checkout
git checkout –orphan latest_branch
Add all the files
git add -A
Commit the changes
git commit -am “commit message”
Delete the branch
git branch -D main
Rename the current branch to main
git branch -m main
Finally, force update your repository
git push -f origin main