Commit 83f61949 authored by Marc Cornellà's avatar Marc Cornellà
Browse files

git: change docs for git_main_branch

Also remove unnecesary dramatic remark
parent 55a98fc0
...@@ -208,13 +208,13 @@ These are aliases that have been removed, renamed, or otherwise modified in a wa ...@@ -208,13 +208,13 @@ These are aliases that have been removed, renamed, or otherwise modified in a wa
### Current ### Current
| Command | Description | | Command | Description |
|:-----------------------|:-----------------------------------------------------------------------------| |:-----------------------|:---------------------------------------------------------------------------------------|
| `grename <old> <new>` | Rename `old` branch to `new`, including in origin remote | | `grename <old> <new>` | Rename `old` branch to `new`, including in origin remote |
| current_branch | Return the name of the current branch | | current_branch | Return the name of the current branch |
| git_current_user_name | Returns the `user.name` config value | | git_current_user_name | Returns the `user.name` config value |
| git_current_user_email | Returns the `user.email` config value | | git_current_user_email | Returns the `user.email` config value |
| git_main_branch | Returns the name of the main branch: `master` if it exists, `main` otherwise | | git_main_branch | Returns the name of the main branch: from origin or from local branches, else 'master' |
### Work in Progress (WIP) ### Work in Progress (WIP)
......
...@@ -25,8 +25,7 @@ function work_in_progress() { ...@@ -25,8 +25,7 @@ function work_in_progress() {
fi fi
} }
# Get the default 'main' branch # Get the default 'main' branch: from origin, from local branches, or else just 'master'
# Marc(2020-07-11): I hope to be able to remove this someday
function git_main_branch() { function git_main_branch() {
# Get default branch from the origin remote # Get default branch from the origin remote
local branch local branch
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment