1
0
mirror of https://github.com/robbyrussell/oh-my-zsh.git synced 2025-12-07 16:00:41 +01:00

git: go back to previous main branch detection logic

Fixes #9114
This commit is contained in:
Marc Cornellà
2020-07-15 17:02:49 +02:00
parent ff7618cf74
commit c99f3c50fa
2 changed files with 14 additions and 30 deletions

View File

@@ -183,8 +183,8 @@ plugins=(... git)
Following the recent push for removing racially-charged words from our technical vocabulary, the git plugin favors using
a branch name other than `master`. In this case, we favor the shorter, neutral and descriptive term `main`. This means
that any aliases and functions that previously used `master`, will use `main` if `master` doesn't exist. We do this via
the function `git_main_branch`.
that any aliases and functions that previously used `master`, will use `main` if that branch exists. We do this via the
function `git_main_branch`.
### Deprecated aliases
@@ -208,13 +208,13 @@ These are aliases that have been removed, renamed, or otherwise modified in a wa
### Current
| Command | Description |
|:-----------------------|:---------------------------------------------------------------------------------------|
| `grename <old> <new>` | Rename `old` branch to `new`, including in origin remote |
| current_branch | Return the name of the current branch |
| git_current_user_name | Returns the `user.name` config value |
| git_current_user_email | Returns the `user.email` config value |
| git_main_branch | Returns the name of the main branch: from origin or from local branches, else 'master' |
| Command | Description |
|:-----------------------|:-----------------------------------------------------------------------------|
| `grename <old> <new>` | Rename `old` branch to `new`, including in origin remote |
| current_branch | Return the name of the current branch |
| git_current_user_name | Returns the `user.name` config value |
| git_current_user_email | Returns the `user.email` config value |
| git_main_branch | Returns the name of the main branch: `main` if it exists, `master` otherwise |
### Work in Progress (WIP)