loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Lucas Grzegorczyk
Lucas Grzegorczyk
and committed by
Gusted
ba1e3405 63a80bf2

+10 -10
+1 -1
templates/repo/empty.tmpl
··· 51 51 <div class="markup"> 52 52 <pre><code>touch README.md 53 53 git init 54 - {{if ne .Repository.DefaultBranch "master"}}git checkout -b {{.Repository.DefaultBranch}}{{end}} 54 + {{if ne .Repository.DefaultBranch "master"}}git switch -c {{.Repository.DefaultBranch}}{{end}} 55 55 git add README.md 56 56 git commit -m "first commit" 57 57 git remote add origin <span class="js-clone-url">{{$.CloneButtonOriginLink.HTTPS}}</span>
+9 -9
templates/repo/issue/view_content/pull_merge_instruction.tmpl
··· 12 12 {{else}} 13 13 <div>git fetch -u origin +refs/pull/{{.PullRequest.Index}}/head:{{$localBranch}}</div> 14 14 {{end}} 15 - <div>git checkout {{$localBranch}}</div> 15 + <div>git switch {{$localBranch}}</div> 16 16 </div> 17 17 {{if .ShowMergeInstructions}} 18 18 <div id="merge-instructions"> ··· 24 24 </div> 25 25 <div class="ui secondary segment"> 26 26 <div data-pull-merge-style="merge"> 27 - <div>git checkout {{.PullRequest.BaseBranch}}</div> 27 + <div>git switch {{.PullRequest.BaseBranch}}</div> 28 28 <div>git merge --no-ff {{$localBranch}}</div> 29 29 </div> 30 30 <div class="tw-hidden" data-pull-merge-style="rebase"> 31 - <div>git checkout {{$localBranch}}</div> 31 + <div>git switch {{$localBranch}}</div> 32 32 <div>git rebase {{.PullRequest.BaseBranch}}</div> 33 - <div>git checkout {{.PullRequest.BaseBranch}}</div> 33 + <div>git switch {{.PullRequest.BaseBranch}}</div> 34 34 <div>git merge --ff-only {{$localBranch}}</div> 35 35 </div> 36 36 <div class="tw-hidden" data-pull-merge-style="rebase-merge"> 37 - <div>git checkout {{$localBranch}}</div> 37 + <div>git switch {{$localBranch}}</div> 38 38 <div>git rebase {{.PullRequest.BaseBranch}}</div> 39 - <div>git checkout {{.PullRequest.BaseBranch}}</div> 39 + <div>git switch {{.PullRequest.BaseBranch}}</div> 40 40 <div>git merge --no-ff {{$localBranch}}</div> 41 41 </div> 42 42 <div class="tw-hidden" data-pull-merge-style="squash"> 43 - <div>git checkout {{.PullRequest.BaseBranch}}</div> 43 + <div>git switch {{.PullRequest.BaseBranch}}</div> 44 44 <div>git merge --squash {{$localBranch}}</div> 45 45 </div> 46 46 <div class="tw-hidden" data-pull-merge-style="fast-forward-only"> 47 - <div>git checkout {{.PullRequest.BaseBranch}}</div> 47 + <div>git switch {{.PullRequest.BaseBranch}}</div> 48 48 <div>git merge --ff-only {{$localBranch}}</div> 49 49 </div> 50 50 <div class="tw-hidden" data-pull-merge-style="manually-merged"> 51 - <div>git checkout {{.PullRequest.BaseBranch}}</div> 51 + <div>git switch {{.PullRequest.BaseBranch}}</div> 52 52 <div>git merge {{$localBranch}}</div> 53 53 </div> 54 54 <div>git push origin {{.PullRequest.BaseBranch}}</div>