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 6054981
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:12:49+00:00 2026-05-23T08:12:49+00:00

I got myself a situation and I am pretty new with git. I have

  • 0

I got myself a situation and I am pretty new with git.

I have redeveloped a theme for WordPress 3 from beeing used in WordPress 2 without the knowledge that the theme was actively used at another location.

Now I need to tag this old version as V1 and the current as V2 as I think this would be the best approach.

My problem is that this old state also have some uncommitted changes.

Commiting them and pushing before tagging would not be optimal.

My solution:

  • branch the old state
  • commit the files to the new branch
  • tag the old master
  • merge my branch with the old master.

Is this the correct way to approach this problem?

Is it something i need to think about before i do this?

Thanks in advance.
/Joel

  • 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-05-23T08:12:49+00:00Added an answer on May 23, 2026 at 8:12 am

    My problem is that this old state also have some uncommitted changes.
    Commiting them and pushing before tagging would not be optimal.

    I may be getting you wrong, but what would be the use of tagging uncommitted stuff at all?

    My solution: – branch the old state – commit the files to the new branch – tag the old master – merge my branch with the old master.

    That sounds like a horrendous detour of just committing the changes directly on master and tagging that commit. Try it: there is no difference. /confused/


    Do you perhaps mean that you have a patch that you want applied to an old version, than tag the result of that as V1? In that case what you describe is one way of doing it nicely.

    Another is:

    git stash save amendments_for_v1
    git checkout -b v1_branch oldrevision
    git stash pop amendments_for_v1
    git commit -am 'amendments'
    git tag V1
    
    git checkout master
    

    now depending on whether you have published history since the oldrevision revision, you could do

    git merge v1_branch      # includes amendments, but doesn't create problems with published history
    

    or

    git rebase v1_branch     
    # includes the same amendments, _as if they had been there before 
    # doing the rest of the work on master_. This results in 'clean' or 
    # 'logical' history *BUT* invalidates the published revisions since oldrevision from the master branch
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I find myself in a situation that someone else must have got stuck in
I got myself in a situation where using the System.Attribute class seemed (at first
I've found myself in a situation, that makes me ask for help. I've got
I just got myself a new toy, a phone with Windows Mobile 6. I'm
I have the following code and got myself confused: I have a query that
got a new blog at wordpress few days ago ( http://ghads.wordpress.com ) and I
Got myself in a funny situation: page has three tables. Using sortEnd, any time
Okay, this is quite an interesting challenge I have got myself into. My RegEx
Finding myself in the situation where I have a method with this signature void
I have some experience with XSLT but now i've got myself a problem: I

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.