06. git log

Posted by Yulai Blog on December 1, 2015

How to create tags? What’s the usage of tags?

git tag

Change-Ids are created at commit time on the client side.

When amending a commit with git commit –amend, leave the Change-Id line unmodified in the commit message. This will allow Gerrit to automatically update the change with the amended commit.

During upload by pushing to refs/for/, refs/drafts/ or refs/heads/*, Gerrit will try to find an existing review the uploaded commit relates to by Change-Id.

If a matching review is found, Gerrit will add the new commit as a new patch set on the existing change.

$ git log -1 commit 29a6bb1a059aef021ac39d342499191278518d1d Author: A. U. Thor author@example.com Date: Thu Aug 20 12:46:50 2009 -0700

1
2
3
4
5
6
7
8
9
Improve foo widget by attaching a bar.

We want a bar, because it improves the foo by providing more
wizbangery to the dowhatimeanery.

Bug: #42
Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5b
Signed-off-by: A. U. Thor <author@example.com>
CC: R. E. Viewer <reviewer@example.com>

┌─[julian@virtualcentos] - [~/GitHub/coding] - [Mon Nov 30, 09:11] └─[$] <git:(learn-something)> git hist

  • 29a5c67 2015-11-30 Update git reflog (HEAD, origin/master, origin/HEAD, master, learn-something) [Julian]
  • b8490a4 2015-11-30 Update samples for git [Julian]
  • e0b54b4 2015-11-29 Add git tutorial (tag: v2.0) [Julian]
  • 6f6cc68 2015-11-29 Make indent as 4 [Julian]
  • 58df0ab 2015-11-23 Add GCC version macros [liangyulai]
  • e5fab7e 2015-11-13 merge [liangyulai]
  • cb02821 2015-11-13 update a code sample [Julian]
  • 35eedbc 2015-11-12 Add code samples (tag: v1.1) [Julian]
  • 9759093 2015-11-12 fix typo [Julian]
  • 66b15f0 2015-11-12 Add case for lambda [Julian]
  • ecee1f9 2015-11-06 Add boost library link [Julian]
  • ec8e262 2015-11-06 Add C++ file [Julian]
  • 7910ddb 2015-11-06 Initial commit (tag: v1.0) [liangyulai]