fetch - Download objects and refs from another repository
1 | git fetch --prune --all |
1 | git switch main |
1 | git fetch origin main:main |
pull - Fetch from and integrate with another repository or a local branch
1 | git switch main |
merge - Join two or more development histories together
1 | git switch main |
rebase - Reapply commits on top of another base tip
1 | git switch main |
1 | git rebase origin/main main |
1 | git rebase --onto <newbase> <upstream> <branch> |
branch - List, create, or delete branches
1 | git branch main |
switch - Switch branches
1 | git switch -c main |
restore - Restore working tree files
checkout - Switch branches or restore working tree files
1 | git checkout main |
reset - Reset current HEAD to the specified state
1 | git switch main |