มันคือทั้งหมดที่รับรู้ โดยทั่วไป Git นั้นค่อนข้างดีในการจดจำการเคลื่อนไหวเนื่องจากGITเป็นเครื่องมือติดตามเนื้อหา
ทั้งหมดนั้นขึ้นอยู่กับว่า "สถิติ" ของคุณแสดงไว้อย่างไร ข้อแตกต่างที่นี่คือแฟล็ก -M
บันทึก git --stat -M
commit 9c034a76d394352134ee2f4ede8a209ebec96288
Author: Kent Fredric
Date: Fri Jan 9 22:13:51 2009 +1300
Category Restructure
lib/Gentoo/Repository.pm | 10 +++++-----
lib/Gentoo/{ => Repository}/Base.pm | 2 +-
lib/Gentoo/{ => Repository}/Category.pm | 12 ++++++------
lib/Gentoo/{ => Repository}/Package.pm | 10 +++++-----
lib/Gentoo/{ => Repository}/Types.pm | 10 +++++-----
5 files changed, 22 insertions(+), 22 deletions(-)
git log --stat
commit 9c034a76d394352134ee2f4ede8a209ebec96288
Author: Kent Fredric
Date: Fri Jan 9 22:13:51 2009 +1300
Category Restructure
lib/Gentoo/Base.pm | 36 ------------------------
lib/Gentoo/Category.pm | 51 ----------------------------------
lib/Gentoo/Package.pm | 41 ---------------------------
lib/Gentoo/Repository.pm | 10 +++---
lib/Gentoo/Repository/Base.pm | 36 ++++++++++++++++++++++++
lib/Gentoo/Repository/Category.pm | 51 ++++++++++++++++++++++++++++++++++
lib/Gentoo/Repository/Package.pm | 41 +++++++++++++++++++++++++++
lib/Gentoo/Repository/Types.pm | 55 +++++++++++++++++++++++++++++++++++++
lib/Gentoo/Types.pm | 55 -------------------------------------
9 files changed, 188 insertions(+), 188 deletions(-)
คอมไพล์บันทึกความช่วยเหลือ
-M
Detect renames.
-C
Detect copies as well as renames. See also --find-copies-harder.
old_file.txtแล้วgit mv old_file.txt new_file.txtจะเทียบเท่ากับgit rm --cached old_file.txt, ,mv old_file.txt new_file.txtgit add new_file.txt