17. Debug/fix commits
1. Use WIP bot https://github.com/apps/wip
2. Fixed new functionality? Use git rebase -> fixup
18. Debug/fix commits
1. Use WIP bot https://github.com/apps/wip
2. Fixed new functionality? Use git rebase -> fixup
3. Yes, you CAN change history in your branch
4. Found bug for old functional? Fix it in new branch
19. Debug/fix commits
1. Use WIP bot https://github.com/apps/wip
2. Fixed new functionality? Use git rebase -> fixup
3. Yes, you CAN change history in your branch
4. Found bug for old functional? Fix it in new branch
5. Use --force-with-lease instead of --force
6. MUST NOT fix/debug/change history in master.
30. Git submodules
• Submodules, like subtrees, aim to reuse
code from another repo somewhere inside
your own repo’s tree
https://medium.com/@porteneuve/mastering-git-submodules-34c65e940407
46. Work efficiency time!
And many others:
https://www.atlassian.com/git/tutorials/git-hooks
https://www.kernel.org/pub/software/scm/git/docs/githooks.html
49. Work efficiency time!
lg = log --graph --pretty=format:"%C(yellow)[%h]%Creset
%Cred[%ar]%Creset%Cblue[%an]%Creset%s"
50. Work efficiency time!
l = log --pretty=format:"%C(yellow)[%h]%Creset
%Cred[%ar]%Creset%Cblue[%an]%Creset%s" --since=1.weeks
51. Work efficiency time!
ls = log --pretty=format:"%C(yellow)%h%Cred%d
%Cblue[%an]%Creset%s" --decorate --numstat
52. Work efficiency time!
lss = log -p --pretty=format:"%C(yellow)[%h]%Creset
%Cred[%ar]%Creset%Cblue[%an]%Creset%s"
53. Work efficiency time!
• Use aliases
• Use git hooks
• Read git history
• Use global .gitignore
54. Work efficiency time!
• Use aliases
• Use git hooks
• Read git history
• Use global .gitignore
– ~/.config/git/ignore
– [core]
excludesfile = ~/git/ignore_global
55. Work efficiency time!
• Use aliases
• Use git hooks
• Read git history
• Use global .gitignore
• Sign all with GPG
56. Work efficiency time!
[user]
signingkey = D17008C3CDCF957F
[gpg]
program = /usr/bin/gpg
[commit]
gpgsign = true
https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work
https://help.github.com/articles/managing-commit-signature-verification/
57. Work efficiency time!
• Use aliases
• Use git hooks
• Read git history
• Use global .gitignore
• Sign all with GPG
• And use your own ...
58. Work efficiency time!
• Use aliases
• Use git hooks
• Read git history
• Use global .gitignore
• Sign all with GPG
• And use your own to conquer
Dimension X
59. More useful links
• Useful Git Techniques
gist.github.com/wayspurrchen/940a
21127b77ac1a9720
• The rabbit hole with hooks
github.com/git-hooks/git-hooks
• And git-scm.com/doc (:
Link to presentation: tinyurl.com/stage-git