How To Tell Git Don't Fetch Tags From Remote
Posted onAnother quick one.
There are scenarios when you want to git fetch
from a certain remote however you don’t want to automatically pull down all of the tags.
There’s a git config setting for that.
Here’s how to tell a single git repository to not fetch tags for a specific remote:
|
|
where <remote-name>
should be replaced with the git remote name.
If you only want to do this as a one off when running the fetch command, you can do this instead:
|
|
Why might you do this? My use case is when dealing with a downstream fork. The git SemVer tags I use don’t match the upstream tags. Pulling in an upstream tag would indicate a release in my project, which isn’t what I mean to do.