git rollback to a certain historical version

1. Use the git log command to view all historical versions and obtain the id of a historical version, assuming that the id of the historical version found is 139dcfaa558e3276b30b6b2e5cbbb9c00bbdca96.

2. 

 

[html]  view plain copy  
 
  1. git reset --hard 139dcfaa558e3276b30b6b2e5cbbb9c00bbdca96  


3. Push the changes to the remote server

 

[javascript]  view plain copy  
 
    1. git push -f -u origin master 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325122519&siteId=291194637