Skip to content

Instantly share code, notes, and snippets.

@xu1718191411
Created February 7, 2018 06:09
Show Gist options
  • Save xu1718191411/3af7c4d87024d957c3086129ee02c922 to your computer and use it in GitHub Desktop.
Save xu1718191411/3af7c4d87024d957c3086129ee02c922 to your computer and use it in GitHub Desktop.
Git履歴のコミットのコメントを再編集する(実用) ref: https://qiita.com/xu1718191411/items/043b9c8967c316511083
Mac-3:imageTab syoui$ git status
On branch tmp
Untracked files:
(use "git add <file>..." to include in what will be committed)
New_Concept_English.txt
nothing added to commit but untracked files present (use "git add" to track)
iMac-3:imageTab syoui$ git add -A
iMac-3:imageTab syoui$ git commit -m "New Concept English"
[tmp e1bb85f] New Concept English
1 file changed, 3 insertions(+)
create mode 100644 New_Concept_English.txt
iMac-3:imageTab syoui$ git push origin tmp
Counting objects: 21, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (18/18), done.
Writing objects: 100% (21/21), 1.92 KiB | 982.00 KiB/s, done.
Total 21 (delta 8), reused 0 (delta 0)
remote: Resolving deltas: 100% (8/8), completed with 1 local object.
To github.com:xu1718191411/LearningAndroid.git
d14b0ee..e1bb85f tmp -> tmp
iMac-3:imageTab syoui$ git commit --amend
iMac-3:imageTab syoui$ git log
commit b6012933a73d90cd78b8737e87ea005dcd972992 (HEAD -> tmp)
Author: syoui <>
Date: Wed Feb 7 13:49:48 2018 +0900
New Concept English Chapter 1
iMac-3:imageTab syoui$ git log
commit 74cdbe3409fb2f8c158b331327651dfc86b0eccb (HEAD, tmp)
Author: syoui <>
Date: Wed Feb 7 14:25:13 2018 +0900
New Concept English Chapter 3
commit 8608ee6d8bc5e1212a2bad24ec61bf6c27d6cb15
Author: syoui <>
Date: Wed Feb 7 14:23:08 2018 +0900
New Concept English Chapter 2
commit e1bb85f7a4b8d749cd675f5bae8c78cbcee4f472
Author: syoui <>
Date: Wed Feb 7 13:49:48 2018 +0900
New Concept English
commit 88c163828eadc42e274a13f21e655916cdd14b74
Author: syoui <>
Date: Wed Feb 7 11:44:10 2018 +0900
add test.md
git rebase -i 88c163828eadc
iMac-3:imageTab syoui$ git log
commit c5659f7f9ebd479e5855cefd4d4ae86ae2a618f7 (HEAD -> tmp)
Author: syoui <>
Date: Wed Feb 7 14:25:13 2018 +0900
New Concept English Chapter 3
commit 4bafdb6beb22243b98c8f27b6c9aa3f3934a4e48
Author: syoui <>
Date: Wed Feb 7 14:23:08 2018 +0900
New Concept English Chapter 2
commit 15ebcbbb10d55a055e42815c8f6a0e4292a6d4a3
Author: syoui <>
Date: Wed Feb 7 13:49:48 2018 +0900
Create New Concept English
commit 88c163828eadc42e274a13f21e655916cdd14b74
Author: syoui <>
Date: Wed Feb 7 11:44:10 2018 +0900
add test.md
iMac-3:imageTab syoui$ git push --force-with-lease origin tmp
Counting objects: 9, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (9/9), done.
Writing objects: 100% (9/9), 933 bytes | 933.00 KiB/s, done.
Total 9 (delta 5), reused 0 (delta 0)
remote: Resolving deltas: 100% (5/5), completed with 1 local object.
To github.com:xu1718191411/LearningAndroid.git
+ fca5bbc...c5659f7 tmp -> tmp (forced update)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment