Nest all content into snippets

This commit is contained in:
Angelos Chalaris
2023-05-07 16:07:29 +03:00
parent 2ecadbada9
commit 6a45d2ec07
1240 changed files with 0 additions and 0 deletions

View File

@ -0,0 +1,27 @@
---
title: Reset master to match remote
type: snippet
language: git
tags: [repository,branch]
cover: old-consoles
dateModified: 2021-04-13T21:10:59+03:00
---
Resets the local `master` branch to match the one on the remote.
- Use `git fetch origin` to retrieve the latest updates from the remote.
- Use `git checkout master` to switch to the `master` branch.
- Use `git reset --hard origin/master` to reset the local `master` branch to match the one on the remote.
```shell
git fetch origin
git checkout master
git reset --hard origin/master
```
```shell
git fetch origin
git checkout master
git reset --hard origin/master
# Local `master` branch is now up to date with remote `master`
```