[orb init] Change to use gitBranch instead of default master
I encountered the same issue as #646
By default, it uses the local branch master even though we set other branch name such as main.
So I added a code to use the gitBranch name as the default local branch.
I locally installed the circleci-cli and confirmed it uses the given branch name when An initial commit has been created - please run 'git push origin main' to publish your first commit! message is shown:
❯ git branch
* main
It was master before.
Codecov Report
Merging #678 (fd5ec34) into master (263902a) will decrease coverage by
0.03%. The diff coverage is0.00%.
@@ Coverage Diff @@
## master #678 +/- ##
==========================================
- Coverage 27.37% 27.34% -0.04%
==========================================
Files 41 41
Lines 4523 4528 +5
==========================================
Hits 1238 1238
- Misses 3134 3139 +5
Partials 151 151
| Impacted Files | Coverage Δ | |
|---|---|---|
| cmd/orb.go | 13.64% <0.00%> (-0.08%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 263902a...fd5ec34. Read the comment docs.