Jump to content

Git: Difference between revisions

From Klenwell Wiki
Line 1: Line 1:
== New Repo ==
== 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>:



Revision as of 14:27, 7 March 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 "Creates develop branch."

See also: