- Create pull latest code of
main
branch to your localmain
branch.
User:(any-branch)$ git checkout main
User:(main)$ git pull origin main
- Create a new branch from
main
branch, use proper naming convension, i.e.-feature-xyz
,ISSUE-ID-xyz
etc.
User:(main)$ git checkout -b feature-xyz
- User proper commit message, i.e-
#ISSUE-ID TYPE: your commit message
. TYPE arechore
,fix
,docs
,test
,feature
,refactor
.
User:(feature-xyz)$ git add -p
User:(feature-xyz)$ git commit -m "commit message"
# For large message use description also
User:(feature-xyz)$ git commit -m "commit message" -m "Descriptions"
- Rebase your code with letest code of
main
branch`.
Warning: Don't rebase without knowing.
User:(feature-xyz)$ git pull --all
User:(feature-xyz)$ git rebase main
- Push your code, and give a Pull Request.
User:(feature-xyz)$ git push origin feature-xyz
- Read README.md first
- Don't spam commits