I'm new to Git,
I do development on a local host and do frequent commits, however, I don't want all this commit history to be shown when I push to origin. How to I achieve that?
I'm new to Git,
I do development on a local host and do frequent commits, however, I don't want all this commit history to be shown when I push to origin. How to I achieve that?
I don't internals of git but following works for me.
git reset --hard <SHA of commit one commit before your first local commit > ( If commit order is RA-B-C if B and C are local commits RA is SHA you have to give)
git merge --squash ORIG_HEAD
git commit
It will be great if someone can explain this.