Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9259015
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T12:33:13+00:00 2026-06-18T12:33:13+00:00

AFAIK, git push –tag pushes every tags under refs/tags to remote. I want to

  • 0

AFAIK, git push --tag pushes every tags under refs/tags to remote. I want to know if there is a way in git to only push some tags that matches a wildcard or regexp?

For example, my repo has tag v1.0, v1.1, v2.0 and v2.1. I want to only push v2.*. I tried

git push <repo> refs/tags/v2.*

and got error

fatal: remote part of refspec is not a valid name in refs/tags/v2.*

Of course, I can always do

cd .git && ls refs/tags/v2.* | xargs git push <repo>

But this does not smell gity.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T12:33:15+00:00Added an answer on June 18, 2026 at 12:33 pm
    git tag | grep '^v2\.' | xargs --no-run-if-empty  git push <repo>
    
    • .git may not be directory, it may not be there at all. Submodules have there file pointing to root repository. Or you can have GIT_DIR set to somewhere else.
    • When no tags match your criteria, you do not want to do the push.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

AFAIK there is absolutely no way to detect the moment when app gets uninstalled.
I know C# is getting a lot of parallel programming support, but AFAIK there
Possible Duplicate: JavaScript: var functionName = function() {} vs function functionName() {} AFAIK, there
This question is about the public key that every .NET assembly has AFAIK (looking
I'd like to know if derivatives in glsl are working on GL_LINES primitives. AFAIK
AFAIK, there is no curses menu extension available in Python yet so you have
AFAIK there is no DOS in vista and windows 7, but I need to
AFAIK, there are two ways of passing data to the view from controller :
I'd like to get a local GIT repository in sync with both a remote
AFAIK, a thread can not access UI components. But I want to preload images

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.