mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-03 14:48:18 +00:00
feat(ui): Suggest git switch
instead of git checkout
(#7385)
- A minor change that replaces the usages of `git checkout` to `git switch` in the UI. `git switch` is preferred over `git checkout` by git. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7385 Reviewed-by: Gusted <gusted@noreply.codeberg.org> Reviewed-by: Beowulf <beowulf@beocode.eu> Co-authored-by: Lucas Grzegorczyk <furai@thd.vg> Co-committed-by: Lucas Grzegorczyk <furai@thd.vg>
This commit is contained in:
parent
63a80bf2b9
commit
ba1e3405d6
2 changed files with 10 additions and 10 deletions
|
@ -51,7 +51,7 @@
|
||||||
<div class="markup">
|
<div class="markup">
|
||||||
<pre><code>touch README.md
|
<pre><code>touch README.md
|
||||||
git init
|
git init
|
||||||
{{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.Repository.DefaultBranch}}{{end}}
|
{{if ne .Repository.DefaultBranch "master"}}git switch -c {{.Repository.DefaultBranch}}{{end}}
|
||||||
git add README.md
|
git add README.md
|
||||||
git commit -m "first commit"
|
git commit -m "first commit"
|
||||||
git remote add origin <span class="js-clone-url">{{$.CloneButtonOriginLink.HTTPS}}</span>
|
git remote add origin <span class="js-clone-url">{{$.CloneButtonOriginLink.HTTPS}}</span>
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
<div>git fetch -u origin +refs/pull/{{.PullRequest.Index}}/head:{{$localBranch}}</div>
|
<div>git fetch -u origin +refs/pull/{{.PullRequest.Index}}/head:{{$localBranch}}</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div>git checkout {{$localBranch}}</div>
|
<div>git switch {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
{{if .ShowMergeInstructions}}
|
{{if .ShowMergeInstructions}}
|
||||||
<div id="merge-instructions">
|
<div id="merge-instructions">
|
||||||
|
@ -24,31 +24,31 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="ui secondary segment">
|
<div class="ui secondary segment">
|
||||||
<div data-pull-merge-style="merge">
|
<div data-pull-merge-style="merge">
|
||||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
<div>git switch {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git merge --no-ff {{$localBranch}}</div>
|
<div>git merge --no-ff {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tw-hidden" data-pull-merge-style="rebase">
|
<div class="tw-hidden" data-pull-merge-style="rebase">
|
||||||
<div>git checkout {{$localBranch}}</div>
|
<div>git switch {{$localBranch}}</div>
|
||||||
<div>git rebase {{.PullRequest.BaseBranch}}</div>
|
<div>git rebase {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
<div>git switch {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git merge --ff-only {{$localBranch}}</div>
|
<div>git merge --ff-only {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tw-hidden" data-pull-merge-style="rebase-merge">
|
<div class="tw-hidden" data-pull-merge-style="rebase-merge">
|
||||||
<div>git checkout {{$localBranch}}</div>
|
<div>git switch {{$localBranch}}</div>
|
||||||
<div>git rebase {{.PullRequest.BaseBranch}}</div>
|
<div>git rebase {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
<div>git switch {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git merge --no-ff {{$localBranch}}</div>
|
<div>git merge --no-ff {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tw-hidden" data-pull-merge-style="squash">
|
<div class="tw-hidden" data-pull-merge-style="squash">
|
||||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
<div>git switch {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git merge --squash {{$localBranch}}</div>
|
<div>git merge --squash {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tw-hidden" data-pull-merge-style="fast-forward-only">
|
<div class="tw-hidden" data-pull-merge-style="fast-forward-only">
|
||||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
<div>git switch {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git merge --ff-only {{$localBranch}}</div>
|
<div>git merge --ff-only {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tw-hidden" data-pull-merge-style="manually-merged">
|
<div class="tw-hidden" data-pull-merge-style="manually-merged">
|
||||||
<div>git checkout {{.PullRequest.BaseBranch}}</div>
|
<div>git switch {{.PullRequest.BaseBranch}}</div>
|
||||||
<div>git merge {{$localBranch}}</div>
|
<div>git merge {{$localBranch}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div>git push origin {{.PullRequest.BaseBranch}}</div>
|
<div>git push origin {{.PullRequest.BaseBranch}}</div>
|
||||||
|
|
Loading…
Add table
Reference in a new issue