From 01be8b96f4ae7acf60ebf447158740b3a2ec6a15 Mon Sep 17 00:00:00 2001 From: Salvo Rapisarda Date: Wed, 19 Jul 2023 16:31:11 +0200 Subject: [PATCH] add new command --- README.md | 7 +++++++ tips.json | 3 +++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 757ef31..33a5547 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,7 @@ P.S: All these commands are tested on `git version 2.7.4 (Apple Git-66)`. * [Use SSH instead of HTTPs for remotes](#use-ssh-instead-of-https-for-remotes) * [Update a submodule to the latest commit](#update-a-submodule-to-the-latest-commit) * [Prevent auto replacing LF with CRLF](#prevent-auto-replacing-lf-with-crlf) +* [Refresh the list of remote branches](#refresh-the-list-of-remote-branches) @@ -999,6 +1000,7 @@ __Alternatives:__ git branch && git checkout ``` + ```sh git switch -c ``` @@ -1264,5 +1266,10 @@ git commit -m "submodule updated" git config --global core.autocrlf false ``` +## Refresh the list of remote branches +```sh +git remote update origin --prune +``` + diff --git a/tips.json b/tips.json index d53d1ae..d5d35bd 100644 --- a/tips.json +++ b/tips.json @@ -531,5 +531,8 @@ }, { "title": "Prevent auto replacing LF with CRLF", "tip": "git config --global core.autocrlf false" + }, { + "title": "Refresh the list of remote branches", + "tip": "git remote update origin --prune" } ]