If you haven’t generated dependencies for other collaborators with your code and you wish to back up several commits, this should work just fine:

$ git reset --hard
HEAD is now at xxxxxxx Description
$ git push -f  Total 0 (delta 0), reused 0 (delta 0)
To https://github.com/username/repository.git
+ 725b5eba...12739094 master -> master (forced update)

Support this site, share this page:Tweet about this on Twitter

Twitter

Share on Reddit

Reddit

Share on LinkedIn

Linkedin

Share on Facebook

Facebook

Email this to someone

email