"Updates were rejected"
You commit, push… and Git refuses: the remote has commits you don't have. Git is protecting your teammate's work from being overwritten. The fix is always the same: pull, (resolve), push.
Pull, then push
echo "Momo: Rs 180" > prices.txt git add . git commit -m "Add prices" git push git pull git log --oneline --graph -4 git push
- If the pull conflicts, resolve exactly as in Unit 2: edit, git add, git commit, then push.
- Never "fix" a rejected push with git push --force on a shared branch — it deletes your teammate's commits from GitHub.