But, why ?
Your pull request(PR) might be pretty old and in mean time many people would have changed the same code. So you can't simply merge your PR into master branch because of the conflicts.
Fetch the latest code from remote master branch.
> git fetch upstream
here upstream is pointing to a remote repository.
If you have multiple commits, it's better to squash them. But it's an optional step.
>git merge-base <yourforkedbranch> <mainremotebranch>
Example: git merge-base TISTUD-9000 release
This will give the hash-id.
>git rebase --interactive <hash-id>
It will list down the commits, If you have more than one, you can replace 'pick' by 'squash' for commits expect first one.
Run rebase command
>git rebase upstream/master
For sure, this will fail because of the conflicts. I mean, that's the main reason why we wanted to go for rebase here.
And once you resolve the conflicts continue with the rebase --continue.
Update the pull request forcefully
>git push -f
> git push origin <yourbranch> -f
This is the crystal clear resource which will talk about this.