Push the current branch to the remote repository:
- •Run
git statusto check if branch is ahead of remote - •Run
git log --oneline origin/HEAD..HEADto show what will be pushed - •If there are commits to push, run
git push - •If the branch has no upstream, use
git push -u origin <branch-name> - •Show the result
Rules:
- •NEVER force push unless the user explicitly asks for it
- •Warn if pushing to main/master directly