Add fetch and view merged

This commit is contained in:
Isabelle Viktoria Maciohsek
2021-04-08 19:43:13 +03:00
committed by Chalarangelo
parent 61ae2147de
commit 6507e3b2a8
2 changed files with 36 additions and 0 deletions

16
snippets/fetch-changes.md Normal file
View File

@ -0,0 +1,16 @@
---
title: Fetch latest changes from remote
tags: repository,beginner
---
Fetches the latest changes from the remote.
- Use `git fetch` to get the latest changes from the remote, without applying them.
```sh
git fetch
```
```sh
git fetch # Fetches the latest updates from the remote
```

View File

@ -0,0 +1,20 @@
---
title: View merged branches
tags: repository,branch,beginner
---
Prints a list of all merged local branches.
- Use `git branch -a --merged` to display a list of all merged local branches.
- Use arrow keys to navigate, press <kbd>Q</kbd> to exit.
```sh
git branch -a --merged
```
```sh
git checkout master
git branch -a --merged
# patch-1
# patch-2
```