使用者工具

網站工具


computer:program:git

差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版前次修改
下次修改
前次修改
computer:program:git [2022/01/25 00:14] – [Rebase] wmcomputer:program:git [2025/06/24 07:36] (目前版本) – [Hooks] wm
行 14: 行 14:
   * [[https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message|5 Useful Tips For A Better Commit Message]]   * [[https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message|5 Useful Tips For A Better Commit Message]]
   * [[http://gitexplorer.com|Git Command Explorer]]   * [[http://gitexplorer.com|Git Command Explorer]]
 +====Commit====
 +  * [[https://gitmoji.dev/|gitmoji]]
 +  * [[https://www.conventionalcommits.org/|Conventional Commits]]
 +  * [[https://apps.gnome.org/app/re.sonny.Commit/|Commit]] (message editor)
 ====Branch==== ====Branch====
   * <code>git branch --sort=committerdate</code> ASC   * <code>git branch --sort=committerdate</code> ASC
行 19: 行 23:
 ====Rebase==== ====Rebase====
   * <code>git rebase -i --root</code>   * <code>git rebase -i --root</code>
 +  * <code>git rebase COMMIT --exec 'git commit --amend --reset-author --no-edit'</code>
   * [[https://github.com/MitMaro/git-interactive-rebase-tool|Git Interactive Rebase Tool]]   * [[https://github.com/MitMaro/git-interactive-rebase-tool|Git Interactive Rebase Tool]]
 ====Hooks==== ====Hooks====
   * [[http://githooks.com/|Git hooks]]   * [[http://githooks.com/|Git hooks]]
 +  * [[https://lefthook.dev/|Lefthook]]
   * [[http://codeutopia.net/blog/2011/06/30/how-to-automatically-run-unit-tests-from-a-git-push/|How to automatically run unit tests from a git push]]   * [[http://codeutopia.net/blog/2011/06/30/how-to-automatically-run-unit-tests-from-a-git-push/|How to automatically run unit tests from a git push]]
   * [[http://viget.com/extend/grunt-getting-started-with-git-hooks|Grunt: Getting Started with Git Hooks]]   * [[http://viget.com/extend/grunt-getting-started-with-git-hooks|Grunt: Getting Started with Git Hooks]]
行 31: 行 37:
 ==== Worktree ==== ==== Worktree ====
   * [[https://ihower.tw/blog/archives/8740|Git worktree: 同時開多個工作目錄]]   * [[https://ihower.tw/blog/archives/8740|Git worktree: 同時開多個工作目錄]]
 +  * [[https://compiledsuccessfully.dev/git-skip-worktree/|Git update-index --skip-worktree, and how I used to hate config files]]
 +==== Notes ====
 +  * [[https://tylercipriani.com/blog/2022/11/19/git-notes-gits-coolest-most-unloved-feature/|Git Notes: git's coolest, most unloved­ feature]]
 ====Tip==== ====Tip====
 +  * [[https://dangitgit.com/|Dangit, Git!?!]]
   * [[http://whileimautomaton.net/2011/10/26220809|Git Undo 999 - How do I undo this operation?]]   * [[http://whileimautomaton.net/2011/10/26220809|Git Undo 999 - How do I undo this operation?]]
     * [[http://stackoverflow.com/questions/5473/undoing-a-git-reset-hard-head1|Undoing a git reset --hard HEAD~1]]     * [[http://stackoverflow.com/questions/5473/undoing-a-git-reset-hard-head1|Undoing a git reset --hard HEAD~1]]
行 81: 行 91:
 ===Blame=== ===Blame===
   * [[http://jfire.io/blog/2012/03/07/code-archaeology-with-git/|Code Archaeology With Git]]   * [[http://jfire.io/blog/2012/03/07/code-archaeology-with-git/|Code Archaeology With Git]]
 +  * <code>git blame --ignore-revs-file</code>
 ===Subtree=== ===Subtree===
   * [[http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/|Alternatives To Git Submodule: Git Subtree]]   * [[http://blogs.atlassian.com/2013/05/alternatives-to-git-submodule-git-subtree/|Alternatives To Git Submodule: Git Subtree]]
行 94: 行 105:
   * [[http://caiustheory.com/git-git-git-git-git/|git git git git git]]   * [[http://caiustheory.com/git-git-git-git-git/|git git git git git]]
 ====Command==== ====Command====
 +  * <code>git commit --amend –C @</code>
   * <code>git checkout -- .</code>   * <code>git checkout -- .</code>
   * <code>git rm --cached</code>   * <code>git rm --cached</code>
行 99: 行 111:
   * <code>git shortlog</code>   * <code>git shortlog</code>
   * <code>git fsck --no-reflogs</code>   * <code>git fsck --no-reflogs</code>
-  * <code>git commit --amend –C HEAD</code>+  * <code>git update-index --assume-unchanged</code>
   * <code>git ls-files -o --directory --exclude-standard</code>   * <code>git ls-files -o --directory --exclude-standard</code>
 <code> <code>
行 115: 行 127:
 </code> </code>
 <code> <code>
-git config --global core.editor "vim"+git config --global core.editor micro
 </code> </code>
 <code> <code>
行 138: 行 150:
   * [[https://github.com/ingydotnet/git-hub|git-hub]]   * [[https://github.com/ingydotnet/git-hub|git-hub]]
   * [[http://www.gistboxapp.com/|GistBox]]   * [[http://www.gistboxapp.com/|GistBox]]
-  * [[http://prose.io/|Prose]] 
   * [[http://git.io/|Git.io]]   * [[http://git.io/|Git.io]]
   * [[http://www.gistoapp.com/|Gisto]]   * [[http://www.gistoapp.com/|Gisto]]
行 187: 行 198:
   * [[https://gogs.io/|Gogs]]   * [[https://gogs.io/|Gogs]]
   * [[https://gitea.io/|Gitea]]   * [[https://gitea.io/|Gitea]]
 +    * [[https://forgejo.org/|Forgejo]]
   * [[http://gitolite.com/|Gitolite]]   * [[http://gitolite.com/|Gitolite]]
 +  * [[https://sourcehut.org/|sourcehut]]
 ===rubygem=== ===rubygem===
   * [[https://github.com/causes/overcommit|Overcommit]]   * [[https://github.com/causes/overcommit|Overcommit]]
行 201: 行 214:
   * [[http://jonas.nitro.dk/tig/|Tig]]   * [[http://jonas.nitro.dk/tig/|Tig]]
     * [[http://blogs.atlassian.com/2013/05/git-tig/|git? tig!]]     * [[http://blogs.atlassian.com/2013/05/git-tig/|git? tig!]]
 +    * .tigrc <code>bind main R !git rebase -i --autosquash %(commit)</code>
   * [[https://github.com/extrawurst/gitui|gitui]]   * [[https://github.com/extrawurst/gitui|gitui]]
   * [[https://github.com/jesseduffield/lazygit|lazygit]]   * [[https://github.com/jesseduffield/lazygit|lazygit]]
行 206: 行 220:
 ===GUI=== ===GUI===
   * [[https://desktop.github.com/|GitHub Desktop]]   * [[https://desktop.github.com/|GitHub Desktop]]
 +  * [[https://github.com/sonnyp/Commit|Commit]]
   * [[https://git-fork.com/|Fork]]   * [[https://git-fork.com/|Fork]]
   * [[https://gitextensions.github.io/|Git Extensions]]   * [[https://gitextensions.github.io/|Git Extensions]]
computer/program/git.1643069641.txt.gz · 上一次變更: 2022/01/25 00:14 由 wm