If your project is starting from scratch:
git init
If you're working with an existing repository and want to rename the default branch to main
:
git branch -m main
Develop Branch:
git checkout -b develop
Feature Branches:
Example:
git checkout -b feature/web-scraping develop
git checkout -b feature/machine-learning develop
git checkout -b feature/data-cleaning develop
Release Branches:
Example:
git checkout -b release/v1.0 main
git checkout -b release/v2.0 main
Hotfix Branches:
Example:
git checkout -b hotfix/bug-fix main
git checkout -b hotfix/security-patch main