diff --git a/snippets/fetch-changes.md b/snippets/fetch-changes.md new file mode 100644 index 000000000..a34bb2671 --- /dev/null +++ b/snippets/fetch-changes.md @@ -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 +``` diff --git a/snippets/view-merged-branches.md b/snippets/view-merged-branches.md new file mode 100644 index 000000000..ec45e86f8 --- /dev/null +++ b/snippets/view-merged-branches.md @@ -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 Q to exit. + +```sh +git branch -a --merged +``` + +```sh +git checkout master +git branch -a --merged +# patch-1 +# patch-2 +```