---
title: "git回滚操作"
author: "freespace"
date: "2013-06-09T04:49:25Z"
tags: []
categories: ["开源软件"]
slug: "git"
draft: false
lastmod: "2013-06-09T04:49:25Z"
id: 1884678
url: "https://freespace.iteye.com/blog/1884678"
---

git 回滚：  
git reset --hard 版本号  
强行回滚远程服务器：  
git push -f

 

然后每个本地都要执行git reset --hard 版本号操作

 

该方法只适合小的团队或者一个人的项目使用，大的团结还是建议git reset --hard 版本号，然后比较多所有有变动的文件，然后覆盖回去，然后提交(commit)，然后push的远程。