Codeberg/pages-server
25
386
Fork
You've already forked pages-server
54

Use git switch instead of git checkout for modern git usage #119

Merged
6543 merged 2 commits from blumia/pages-server:git-switch into pages 2022年07月27日 17:26:56 +02:00
Contributor
Copy link

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, named pages, and all tracked files are removed so we no longer need a rm step.

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, named `pages`, and all tracked files are removed so we no longer need a `rm` step.
Contributor
Copy link

but files that where .gitignored still exist

but files that where .gitignored still exist
Author
Contributor
Copy link

but files that where .gitignored still exist

Make sense. Patch updated and now it only change checkout to switch.

> but files that where .gitignored still exist Make sense. Patch updated and now it only change `checkout` to `switch`.
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Codeberg/pages-server!119
Reference in a new issue
Codeberg/pages-server
No description provided.
Delete branch "blumia/pages-server:git-switch"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?