0%

git服务端强制覆盖本地

1
2
git reset --hard origin/master 
git pull

版本管理软件有时boom….

其他常用命令备用:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 显示当前分支的版本历史
$ git log

# 下载远程仓库的所有变动
$ git fetch [remote]


# 取回远程仓库的变化,并与本地分支合并
$ git pull [remote] [branch]

# 强行推送当前分支到远程仓库,即使有冲突
$ git push [remote] --force


# 暂时将未提交的变化移除,稍后再移入
$ git stash
$ git stash pop


# 新建一个commit,用来撤销指定commit
# 后者的所有变化都将被前者抵消,并且应用到当前分支
$ git revert [commit]