From 3292d88fbc5709c67ac18093396b0246d2c61f14 Mon Sep 17 00:00:00 2001 From: nick Date: Mon, 25 Nov 2019 10:57:26 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E6=B7=BB=E5=8A=A0=20git=20?= =?UTF-8?q?=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- git.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/git.md b/git.md index 743ad87..ae173dc 100644 --- a/git.md +++ b/git.md @@ -223,4 +223,18 @@ git stash drop #删除最近的暂存代码 git stash drop stash@{0} #删除指定 id 的暂存代码 git stash clear #清空所有暂存代码 +``` + +__实用不常用命令__ + +``` +git shortlog -sn #查看成员提交次数 + +git whatchanged --since='2 weeks ago' #查看指定时间的提交记录 + +git diff --name-only --diff-filter=U | uniq | xargs $EDITOR #查看所有冲突文件 + +#删除最近一次提交中文件并修改提交信息 +git rm —-cached file_name +git commit —-amend ``` \ No newline at end of file