-1

I want to know how to rollback git project to previous version after commit. I experienced that heroku keeps activity log for web projects and has the capability of rolling back to previous version with simple options.Is this facility available for github or atlassian bitbucket ? Is there any commands for that ?

Kaviranga
  • 576
  • 2
  • 10
  • 24

2 Answers2

1

Description

Yes, both services provide such utilities. There are a number of commands that you can execute to achieve a roll-back but they all depend on the way they treat history. Please see some git signatures below and their associated references for more information.

Example

git revert <commit>
git rebase -i <HEAD~n>
git reset <commit>
git checkout <commit>

Reference

git-revert
git-rebase
git-reset
git-checkout

e.doroskevic
  • 2,129
  • 18
  • 25
0

This has already been asked and very well responded to here How to revert Git repository to a previous commit?

You can either branch you current work or decided if you need to temporarily rollback commits or if you want to premanently remove commits.

Community
  • 1
  • 1
Jools
  • 107
  • 1
  • 8