From 362d958731c32dd4d80a3464f411aa5cefd7ebbd Mon Sep 17 00:00:00 2001 From: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:22:21 +0100 Subject: [PATCH] git-terminal: prefer merge over rebase (#14463) Prefer merge over rebase. This follows the preferred way. Otherwise people will force-push in a PR which is discouraged in the beginning of the page Co-authored-by: Florian B. --- contributing-guides/git-terminal.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contributing-guides/git-terminal.md b/contributing-guides/git-terminal.md index f649a85d7f..a850b680dd 100644 --- a/contributing-guides/git-terminal.md +++ b/contributing-guides/git-terminal.md @@ -57,10 +57,10 @@ There are two ways to update your fork. ```bash git switch main -git remote add upstream https://github.com/tldr-pages/tldr.git # only run if you don't already have the upstream remote (check with "git remote -v") +git remote add upstream https://github.com/tldr-pages/tldr.git # only run if you don't already have the upstream remote (check with "git remote -v") git fetch upstream main -git rebase upstream/main # in case you have any merge conflicts, click the link below to see how to resolve them -git push --force-with-lease # not needed if you only want to update your local repository +git merge upstream/main # in case you have any merge conflicts, click the link below to see how to resolve them +git push ``` [How to resolve merge conflicts](https://docs.github.com/en/github/collaborating-with-pull-requests/addressing-merge-conflicts/resolving-a-merge-conflict-using-the-command-line)