mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-12-02 21:15:27 +00:00
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>
This commit is contained in:
parent
f5f9eb0860
commit
31b98b86ff
@ -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">
|
||||
|
Loading…
Reference in New Issue
Block a user