سلام
وقتی در گیت ریپازیتوری میسازیم، از دستورات زیر باید استفاده کنیم تا فایلها رو به گیت منتقل کنیم
echo "# test" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/*****/test.git
git push -u origin main
git remote add origin https://github.com/*****/test.git
git branch -M main
git push -u origin main
حالا دستور git branch -M دقیقا چیکار میکنه؟
git branch [--color[=<when>] | --no-color] [--show-current]
[-v [--abbrev=<n> | --no-abbrev]]
[--column[=<options>] | --no-column] [--sort=<key>]
[--merged [<commit>]] [--no-merged [<commit>]]
[--contains [<commit>]] [--no-contains [<commit>]]
[--points-at <object>] [--format=<format>]
[(-r | --remotes) | (-a | --all)]
[--list] [<pattern>...]
git branch [--track | --no-track] [-f] <branchname> [<start-point>]
git branch (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>]
git branch --unset-upstream [<branchname>]
git branch (-m | -M) [<oldbranch>] <newbranch>
git branch (-c | -C) [<oldbranch>] <newbranch>
git branch (-d | -D) [-r] <branchname>...
git branch --edit-description [<branchname>]
توی صفحه زیر هم توضیح کامل ندیدم: (یا بهتره بگم دقیق متوجه نشدم)
https://git-scm.com/docs/git-branch
##########
-m
--move
Move/rename a branch and the corresponding reflog.
-M
Shortcut for --move --force.
منظورش اینه که دیگه از این به بعد بجای master از main استفاده کنیم؟ باید سایر برنچها رو با کدوم merge کنیم؟