mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-08-01 22:57:46 +00:00
upgrade 0.83 (#563)
fix `<duration> | into string` `gn` allows init git repo in current directory, and use `main` as default branch Co-authored-by: agent <agent@nuc>
This commit is contained in:
parent
e6adf4e0ae
commit
c1b68089ab
2 changed files with 7 additions and 6 deletions
|
@ -182,8 +182,12 @@ export def-env gn [
|
|||
--init (-i): bool # git init
|
||||
] {
|
||||
if $init {
|
||||
git init $repo
|
||||
cd $repo
|
||||
if ($repo | is-empty) {
|
||||
git init --initial-branch main
|
||||
} else {
|
||||
git init $repo --initial-branch main
|
||||
cd $repo
|
||||
}
|
||||
if $submodule {
|
||||
git submodule init
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue