Git: Difference between revisions
Appearance
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
== | == Init == | ||
I use the following routine in setting up a new repository with branches <tt>main</tt> (instead of <tt>master</tt>) and <tt>develop</tt>: | I use the following routine in setting up a new repository with branches <tt>main</tt> (instead of <tt>master</tt>) and <tt>develop</tt>: | ||
| Line 7: | Line 7: | ||
git branch -m master main | git branch -m master main | ||
git checkout -b develop | git checkout -b develop | ||
git commit --allow-empty -m " | git commit --allow-empty -m "Create develop branch."</pre> | ||
See also: | See also: | ||
* https://stackoverflow.com/a/42871621/1093087 | * https://stackoverflow.com/a/42871621/1093087 | ||
Latest revision as of 13:19, 26 June 2021
Init
I use the following routine in setting up a new repository with branches main (instead of master) and develop:
cd my-new-project git init git commit --allow-empty -m "Initial commit on main branch." git branch -m master main git checkout -b develop git commit --allow-empty -m "Create develop branch."
See also: