diff --git a/docs/sources/write/tooling-and-workflows/index.md b/docs/sources/write/tooling-and-workflows/index.md index db5ff1742..782b1a609 100644 --- a/docs/sources/write/tooling-and-workflows/index.md +++ b/docs/sources/write/tooling-and-workflows/index.md @@ -370,32 +370,21 @@ From the point where you created your branch and when you're ready to merge the If the changes don't conflict, you can use Git to incorporate the changes made to the default branch with yours without making any additional changes. -First, fetch changes to all branches and remotes: +{{< admonition type="tip" >}} +You can also update a contributors' branch as long as the pull request shows **Maintainers are allowed to edit this pull request.** -```bash -git fetch --all -``` +To do so, first check out their pull request with either [Check out a PR branch](https://grafana.com/docs/writers-toolkit/write/tooling-and-workflows/#check-out-a-pr-branch) or [Check out a PR branch from a fork](https://grafana.com/docs/writers-toolkit/write/tooling-and-workflows/#check-out-a-pr-branch-from-a-fork). +{{< /admonition >}} -Update your local copy of the main branch by merging the remote changes into it: +First, fetch changes to all branches and remotes: ```bash -git switch main -git merge --ff-only -``` - -After switching branches, Git also lets you know if your local copy needs updating with the message _Your branch is behind 'origin/main'_. -The `--ff-only` flag means _fast-forwarding_, which applies the changes to the end of your local copy when your local copy has no conflicting changes. - -```console -Switched to branch 'main' -Your branch is behind 'origin/main' by 30 commits, and can be fast-forwarded. - (use "git pull" to update your local branch) +git fetch --all ``` -Now switch back to your branch and merge the default branch into it, applying its changes into yours: +On your branch, merge the default branch, applying its changes into yours: ```bash -git switch my-branch git merge main ```