On my local git repo I've got many commits, which include 'secret' connection strings :-)

I don't want this history on github when I push it there.

Essentially I want to push everything I have, but want to get rid of a whole lot of history.

Perhaps I would be better running in a branch for all my dev, then just merging back to master before committing... then the history for master will just be the commit I want.

I've tried running rebase:

git rebase –i HEAD~3

That went back 3 commits, and then I could delete a commit.

However ran into auto cherry-pick failed, and it got quite complex.

Any thoughts greatly appreciated... no big deal to can the history and start again if this gets too hard :-)

Edit
Report