From 31b98b86ffb0a805231a267a9e3f01c1b9791d8b Mon Sep 17 00:00:00 2001 From: Gary Wang 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 Co-committed-by: Gary Wang --- 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 @@

or

Create a branch pages in a repository:
- git checkout --orphan pages
git rm --cached -r . + git switch --orphan pages
git rm --cached -r .