Git new get

Time:2021-2-2

Git new get

This article is only written for the convenience of reference

Delete remote merged local branches

1. View local branches and tracking:

git remote show origin

You can find branches whose remote branches have been deleted.
You can use the following command to delete these branches

git remote prune origin

Git 2.23

We notice that git checkout < Branch > is used to switch branches,
And undo modification is git checkout — < File >, the same command has two functions, which is really a bit confusing.

git switch

Create and switch to a new branch:

git siwtch -c <branch name>

Switch to an existing branch

git switch <branch name>