---
title: git
date: 2018-08-11 23:18:58
update: 2018-10-28 23:18:58
categories: GIT
tags: [git]
---
### 常见错误
```
$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
```
原因是在本地的文件夹为NewRepo,与远程仓库名称不一样
### 撤销commit
参考: https://blog.csdn.net/ligang2585116/article/details/71094887
```
Administrator@PC-201805212337 MINGW64 /e/wk/vuepro/my-project (master)
$ git reflog
bcf46eb (HEAD -> master) HEAD@{0}: commit: no message
223151b HEAD@{1}: commit: no message
Administrator@PC-201805212337 MINGW64 /e/wk/vuepro/my-project (master)
$ git show HEAD@{0}
commit bcf46eb447208863f3da6e86e88e7bd4af95cc90 (HEAD -> master)
Author: volc1612 <916215796@qq.com>
Date: Sat Aug 11 23:46:20 2018 +0800
no message
diff --git a/src/App.vue b/src/App.vue
index b8c89f6..cf577da 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -9,6 +9,7 @@
// 导入组件
import Hello from './components/Hello'
第一次提交
+第二次提交
export default {
name: 'App',
components: {
Administrator@PC-201805212337 MINGW64 /e/wk/vuepro/my-project (master)
$ git show HEAD@{1}
commit 223151bc805f8ee737aad4ab7d89b4dacfa9f3a6
Author: volc1612 <916215796@qq.com>
Date: Sat Aug 11 23:46:04 2018 +0800
no message
diff --git a/src/App.vue b/src/App.vue
index 56c1022..b8c89f6 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -8,6 +8,7 @@
