Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
83f61949
Commit
83f61949
authored
Jul 11, 2020
by
Marc Cornellà
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git: change docs for git_main_branch
Also remove unnecesary dramatic remark
parent
55a98fc0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
9 deletions
+8
-9
README.md
plugins/git/README.md
+7
-7
git.plugin.zsh
plugins/git/git.plugin.zsh
+1
-2
No files found.
plugins/git/README.md
View file @
83f61949
...
...
@@ -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:
`master`
if it exists,
`main`
otherwise
|
| 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'
|
### Work in Progress (WIP)
...
...
plugins/git/git.plugin.zsh
View file @
83f61949
...
...
@@ -25,8 +25,7 @@ function work_in_progress() {
fi
}
# Get the default 'main' branch
# Marc(2020-07-11): I hope to be able to remove this someday
# Get the default 'main' branch: from origin, from local branches, or else just 'master'
function
git_main_branch
()
{
# Get default branch from the origin remote
local
branch
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment