-
-
Notifications
You must be signed in to change notification settings - Fork 26k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New git plugin: git2 #2494
New git plugin: git2 #2494
Conversation
Compared to the first git plugin, this one adds several organised git aliases and increase the completion function provided by zsh. Please note that is is a complete rework, with many new aliases to relearn.
You should squash the typo commit. The plugin completion seems to be ok. I don't know about the aliases. |
**Maintainer:** [Stibbons](https://github.com/Stibbons) | ||
|
||
Compared to the first git plugin, this one adds several organised git aliases and increase the completion | ||
function provided by zsh. Please note that is is a complete rework, with many new aliases to relearn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you be more specific ?
As for myself I'm not using aliases, but completion is definitely interesting. It seem the completion function cannot find options on some git commands like git-blame
/ git-annotate
etc.
Description updated |
The following comments are talking about this PR (in chronological order): |
# Remove all .orig, .BASE.*, .REMOTE.*, .LOCAL.*, *.BACKUP files | ||
alias gclean=" find . -name '*.orig' -or -name '*.REMOTE.*' -or -name '*.LOCAL.*' -or -name '*.BACKUP.*' -or -name '*.BASE.*' | xargs -r rm -v" | ||
|
||
# Edit global Git configuration files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that really necessary?
Hey, I merged you aliases into the bulk update for the git plugin: #2790. Tell me if I missed any. Some of them were renamed for consistency, but this is open to discussion over there. I will now look into your completion files. Can you explain how you "increased" them? |
alias gl='git log' | ||
compdef _git gl=git-log | ||
# Git log graph | ||
alias glg='git log --stat --max-count=10' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need --max-count=10
? I want to get rid of this from all git log
aliases.
I'm closing this since it became less useful after #2790. Reopen if you want to work on it a bit more. |
Compared to the first git plugin, this one adds several organised
git aliases and increase the completion function provided by zsh.
Please note that is is a complete rework of the git plugin, with
many new aliases to relearn. People can still use "git" plugin
with the good old workflow, while new person can starts directly
with this new one, and learn this new workflow.
This creates a new git plugin with different aliases. I've merged
the good ideas from other zsh projects out there, and created
this consolidated, logically organized and easy to remember
aliases and other git commands.
Aliases are choosen to:
What do you think about this? This gives the following workflows:
Classic Git Project
$ cd myproject
$ gfa # dear git, fetch me all remotes
$ # hack hack hack
$ gg # show me a nice gui so I can select the lines I want to commit and enter the commit message
$ # rehack
$ gga # dear git, I changed my mind, let me amend my last commit
$ # new hack
$ gg
$ gP # dear git, push these changes to my remote (gp is for git pull aliases)
Git-Repo Project (Android)
$ rsrra # dear repo, repo sync all project and rebase everything with auto stash.
$ #hack
$ gg # dear git, commit my change
$ ru # dear repo, please upload everything change to the remote
Branch Merging
$ git merge # dear git, please merge this branch to mine
(conflict araises)
$ gmt # dear git, show me what’s wrong!
(kdiff3 - or you favorite merge tool - show me what’s wrong, Ctrl+2/Ctrl+3 to choose the solution, modify the code, Ctrl+Up/Down to jump to next conflict, and then save)
$ gg # dear git, commit my changes
(edit the commit message)
$ gP # dear git, push that to my remote
Branch merging upstream changes
$ gmum # git merge upstream master
$ gmt # git mergetool
$ gg # git gui
$ gP # git push
Rebase / fixup / squash / reorder / split commit history
$ gr2 # dear git, let me edit you history up to 2 commits behind (git rebase -i HEAD
2)4)$ gr4 # dear git, let me edit you history up to 4 commits behind (git rebase -i HEAD
$ gr10 # dear git, let me edit you history up to 10 commits behind (git rebase -i HEAD~10)