Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh the list of remote branches #217

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end toc -->
Expand Down Expand Up @@ -999,6 +1000,7 @@ __Alternatives:__
git branch <branch-name> && git checkout <branch-name>
```


```sh
git switch -c <branch-name>
```
Expand Down Expand Up @@ -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
```

<!-- Don’t remove or change the comment below – that can break automatic updates. More info at <http://npm.im/doxie.inject>. -->
<!-- @doxie.inject end -->
3 changes: 3 additions & 0 deletions tips.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
]