by Devin Yang
(This article was automatically translated.)

Published - 7 years ago ( Updated - 7 years ago )

Forcibly clear all the data of the remote repo and generate a new repo,
Be aware this is a dangerous move , know you know what you are doing.

git init
git add .
git commit -m 'Initial commit'
git remote add origin [repo_address]
git push --mirror --force

Tags: git

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


git

Display your own version control through the git command, for example, within 7 days?

How to display your own version control through git commands? These commands are for reference only, at least the author name should be changed. --author parameter, can also be mailbox

gitlab,reset password

reset gitlab password

The gitlab built with docker has been useless for a long time, and I forgot the password, how to reset it. ​​​​​​We should be able to enter the gitlab container through the following command...

git

Use the git logt command to quickly list your own or others' commits

Here are two commands to quickly list all commits of yourself or others