- To add all your changes for commit, run
git add .
- To commit all changes you added in step 1, run
git commit -m "<Insert commit message>"
After committing, follow the steps below.
- Always check for changes from the branch you checked out from before pushing. (let's say your branch was checked out from
master
. Check if there are any updates fromorigin/master
) - Run
git fetch
to check if there are any updates. If there are updates rungit rebase origin/<insert_branch_where_you_checked_out_from_here>
- If there are no conflicts. Run
git push origin HEAD
to push your branch to the repo.