tricky

tricky

hidden feature

git var

git verify-commit

quick edit gitconfig

create git patch

get current branch

get previous branch

get previous branch name

or

checkout to previous branch

  • or

quick diff with previous branch

quick push to current branch

  • or ignore the warning

revision

the first revision

git commit

emoji

git path

get absolute root path

get relative root path

get absolute root path inside submodules

get .git path

inside the work tree or not

.gitattributes

Refreshing the repository after committing .gitattributes

reference:

or

format

reference Be a Git ninja: the .gitattributes file

git summaries

get repo active days

get commit count

  • since particular commit

  • since the initial commit

get all files count in the repo

get contributors

collection

format the author

show diff file only

repo age

who-am-i

[!NOTE|label:references:]

  • reject the cached

trailers

[!NOTE|label:references:]

git config

[!TIP|label:tips:]

  • if trailer.sign.command is not set, the default value is git var GIT_COMMITTER_IDENT

  • if trailer.sign.key set as "Signed-off-by: ", it will impacted the git log --format=%(trailers:key=Signed-off-by:,valueonly,separator=%x2C)

generate trailers

[!NOTE|label:references:]

  • by template

commit

  • with control

  • i.e.:

show trailers

[!NOTE|label:references:]

configure and format

  • Signed-off-by:

  • Signed-off-by

scripts

iGitOpt

--stat

--numstat

--shortstat

hook

[!NOTE|label:references:]

  • commit-msg for signed-off-by

  • commit-msg for change-id

git message

[!NOTE|label:references:]

TYPE
FULL NAME
SIMPLE DESCRIPTION
DESCRIPTION

build

构建系统或外部依赖项的变化

changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)

ci

CI 配置文件和脚本的更改

changes to our ci configuration files and scripts (example scopes: travis, circle, browserstack, saucelabs)

docs

documentation

仅文档修改

documentation only changes

feat

feature

新功能

a new feature

fix

bugfix

修复问题

a bug fix

perf

性能提高

a code change that improves performance

refactor

重构 (即不是新增功能, 也不是修改bug)

a code change that neither fixes a bug nor adds a feature

style

formatting

格式 (不影响代码运行的变动)

changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)

test

增加测试

adding missing tests or correcting existing tests

chore

maintain

构建过程或辅助工具的变动

changes to the build process or auxiliary tools and libraries such as documentation generation

  • sample

refspec

[!NOTE|label:references:]

others

alias

show git alias

ls

git alias escaping

[!NOTE|label:references:]

Last updated

Was this helpful?