git clone https://github.com/<USERNAME>/<project>.git
cd <project>
git checkout -b dev-feature
git add <filename>
git commit -m "<message>"
git push --set-upstream origin dev-feature
git checkout main
git pull origin main
git merge dev-feature
git push origin main
git branch -d dev-feature
git push origin --delete dev-feature
git checkout main
git fetch origin
git pull origin main
git checkout dev-feature
git rebase main
Manually resolve the conflict in the given file
git add <conflicted-file>
git rebase --continue
git push origin dev-feature
or, if you’ve rebased:
git push origin dev-feature --force
git checkout main
git pull origin main
git checkout main
git pull origin main
git checkout -b dev-newfeatureorbugfix
git reset HEAD <filename>
git reset