# Create and switch to the dev branch
git checkout -b <new_branch_name>
Make your changes in this branch.
# Switch to the dev branch
git checkout <new_branch_name>
# Fetch the latest changes from the remote dev branch and merge them into your local dev branch
git pull origin <new_branch_name>
# chec the status before commit or add
git status
# Stage changes
git add .
# Commit changes
git commit -m "Your commit message"
# Push changes to the remote dev branch
git push origin dev
# Switch to the main branch
git checkout main
# Merge changes from dev to main
git merge dev
# Push changes to the remote main branch
git push origin main
# Switch back to the dev branch
git checkout dev
Repeat these steps as needed for your workflow. Resolve any conflicts during the merge process.