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

  • Home
  • SEARCH
  • 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 8256169
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:46:18+00:00 2026-06-08T01:46:18+00:00

I have created a git tag, but then I made some other commits and

  • 0

I have created a git tag, but then I made some other commits and one of those needs to be in the tag, the others do not.

For example:

git commit 123
git commit 456
git commit 789
git commit 1011
git commit 1213

I made a tag at point 1011, but now I want to add commit 123 to that and not any of the ones in between. Any way to do that?

  • 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-08T01:46:19+00:00Added an answer on June 8, 2026 at 1:46 am

    I think you have your terminology mixed up.

    • A tag is a string label attached to a single commit. It doesn’t “contain” commits, it’s just another way to name the commit that was tagged.
    • A branch is a ordered set of commits, when you use git commit you’ll add the commit to the current branch.

    It’s not clear if you just meant branch instead of tag, or if you’re asking why the output of e.g. git log mytag is showing all commits since up until 1011.

    git log mytag will log the commit tagged with mytag and all its parents.

    If you meant branch and the branch you created does not yet contain commit 123 in it’s history, you can git cherry-pick it.

    Writing this, I realize you might also have meant how to add commit 123 to set of commits listed by git log mytag. To do that you need to create a new branch at that point, git checkout -b mybranch mytag, then cherry pick commit 123, then move the tag to the new commit, using git tag -f. Then you can go back to your previous branch (e.g. git checkout master). Your previous branch will then have a different history, the branches have diverged.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a object tag git tag -a tag_1 -m test tag But
In my repository, I have created tags using the following commands. git tag v1.0.0
I have created a .gitignore file in the folder with the .git folder, but
I am not using github. We have git setup on our machine. I created
I have just created my first git repository for some software my company writes.
I have created a git repo in a folder that had spaces and some
I have created branch with git checkout -b mybranch. It seems that something went
I have created a bare git repo (lets call it repo #1) and cloned
I have just created a GIT on a folder. I now want to add
What are the current best practices with git branches that have been created to

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.