By editor, 21 March, 2018 Question How to reset a remote GIT repository to remove all commits ? Completely reset Delete the .git directory locally. Recreate the git repository: $ 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 <url> $ git push --force --set-upstream origin master Tags Git Code Comments You must have JavaScript enabled to use this form. Your name Subject Comment About text formats Plain text No HTML tags allowed. Lines and paragraphs break automatically. Web page addresses and email addresses turn into links automatically.
Comments