mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2024-11-23 06:18:59 +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>
|
<div class="codeberg-divider"><hr>or<hr></div>
|
||||||
<p>
|
<p>
|
||||||
Create a branch <code class="code">pages</code> in a repository:<br>
|
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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg text-center">
|
<div class="col-lg text-center">
|
||||||
|
Loading…
Reference in New Issue
Block a user