Delete all empty folders
find . -empty -type d -delete
git rm --cached .
If you want to remove a specific file, replace the dot with the file path. Delete all git history without resetting repo.
Deleting the .git folder may cause problems in your git repository. If you want to delete all your commit history but keep the code in its current state, it is very safe to do it as in the following:
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
Create a temp folder locally, and start a new empty in the destination service. Then clone the repo from source as mirror, and push the mirror to destination.
git clone --mirror <source-repo-url> cd <source-repo-name> git push --mirror <dest-repo-url>
The mirror in not readable so it can be deleted after pushing.
You need to generate keys and use the RSA algorithm.
ssh-keygen -t rsa
Open the public key and manually copy-paste it in the “Authorized Keys” under Services, SSH, in DD-WRT.
When logging in, use root.