git clone https://github.com/<USERNAME>/<project>.git
cd <project>
git checkout -b dev-feature
git add <filename>
You need to fetch the latest commits from the remote repository without merging them
git fetch origin
After fetching, you can compare your local branch with the remote branch to see which files have changed
git diff --name-only origin/main
If you want to see the actual changes in the files
git diff origin/main
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