git updates were rejected because the tip of your current branch is behind

  1. Run git fetch to update your local repository with changes from the remote repository.
git fetch
  1. Run git pull to fetch and merge the changes from the remote repository into your current branch.
git pull origin <branch_name>
  1. If you encounter conflicts during the pull, resolve them by editing the affected files. After resolving conflicts, add the changes to the staging area.
git add <conflicted_files>
  1. Complete the merge process by committing the changes.
git commit -m "Merge remote changes"
  1. Push the changes to the remote repository.
git push origin <branch_name>