jueves, 25 de octubre de 2018

How to reset a remote git repository to remove all commits

Delete the .git directory locally. Recreate the git repostory:
$ cd (project-directory)
$ git init
$ (add some files)
$ git add .
$ git commit -m 'Initial commit'
Push to remote server, overwriting. Remember you're going to mess everyone else up doing this … you better be the only client.
$ git remote add origin 
$ git push --force --set-upstream origin master

No hay comentarios.:

Publicar un comentario