Skip to content
Ed Reckers edited this page Feb 23, 2014 · 5 revisions

WP Project Bootstrap Wiki

Force Push a GIT Repository

If when moving to WP Project Bootstrap you find that there are just too many conflicts to resolve you may just want to start clean. What you'll want to do the following:

  1. Delete the .git directory locally. 2) Recreate the git repostory

$ cd (project-directory) $ git init $ (add some files) $ git add . $ git commit -m 'Initial commit'

  1. 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

  • This wipes out all commit history.

http://stackoverflow.com/questions/2006172/how-to-reset-a-remote-git-repository-to-remove-all-commits

Clone this wiki locally