From 31b98b86ffb0a805231a267a9e3f01c1b9791d8b Mon Sep 17 00:00:00 2001 From: Gary Wang <blumia@noreply.codeberg.org> Date: Wed, 27 Jul 2022 17:26:55 +0200 Subject: [PATCH] Use git switch instead of git checkout for modern git usage (#119) Git 2.23 came up with the new `git switch` command, which is not a new feature but an additional command to `switch/change branch` feature which is already available in the overloaded git checkout command. By using `git switch --orphan pages`, it will create a new orphan branch. Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/119 Reviewed-by: 6543 <6543@noreply.codeberg.org> Co-authored-by: Gary Wang <blumia@noreply.codeberg.org> Co-committed-by: Gary Wang <blumia@noreply.codeberg.org> --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 0efcd2c..2d91ba1 100644 --- a/index.html +++ b/index.html @@ -128,7 +128,7 @@ <div class="codeberg-divider"><hr>or<hr></div> <p> Create a branch <code class="code">pages</code> in a repository:<br> - <code class="code">git checkout --orphan pages</code><br><code class="code">git rm --cached -r .</code> + <code class="code">git switch --orphan pages</code><br><code class="code">git rm --cached -r .</code> </p> </div> <div class="col-lg text-center">