I have some history rewriting to do for which I'd like to keep my original tree intact for now. The rewritten tree should however copy the tags previously used as well. Is there any less manual option than e.g. prepending tag names with the branch name?
git: Is there something like per-branch tags?
5.4k Views Asked by Tobias Kienzler At
2
There are 2 best solutions below
Related Questions in GIT
- problem to push files on a repository git
- diff3 output in git conflict style, including mergeable hunks
- Git Not In Sync with Local Branch
- Setting up the version control of .dotfiles while the .config is connected to a forked repo
- How to fix overriding the main branch in Git?
- I can't add text to "Message" in VS Code when committing to Git
- How can i redirect pull request from main branch to another branch
- Xcode commits (possibly outside of any branch) disappeared, how to get them back?
- Git/TortoiseGit : how to apply ONLY the changes from ONE commit from branch A, to branch B?
- How can I reintroduce username an password on git using fedora?
- GIT SKIP EMPTY DIRECTORIES
- Git smudge run once per checkout or per commit?
- I can't find ~/.profile or ~/.bashrc in C:/Users/<user>/.ssh folder
- Set environment variable during push for GitHub Actions
- Android WebRTC compile
Related Questions in TAGS
- kid3 - Import Album Art along with other tags from Discogs
- total commander adds a note to a file using tcimg and the parameters don't work correctly?
- Laravel: check if cache has key with thag
- How do I add tags to HTML web pages and sort them with a filter?
- Replace nth-occurence of a string with an html tag
- how to mention tags in robotframework while writing scripts
- I'm in Playwright, how do I run specific test cases by tag in (CI) execution
- What software can I use (if any) to embed URL links into a .mp4 file without paying for a subscription?
- OSMNX: Dealing with empty dataframe of attributes when using the features module
- How can I hide the "BRAND NEW" project in my portfolio?
- How do you sort a list view in Visual C++?
- Can't overwrite !important tag (tried several tips already)
- Trouble Separating Tags from Notes in JavaScript Notes App
- not able to add previous commit into github tag using workflow
- Allows tag edition in buefy taginput
Related Questions in GIT-REBASE
- Rebase over some branch with ignoring previusly dropped commit(s)
- Git rebase without re-adding dropped commits
- How can I avoid fixing other peoples merges when doing a git rebase
- How Can I Convert Tabs To Spaces Using Rebase?
- Git rebasing attribute the change to the wrong file
- Rebooting During Git Bash Rebase Operation
- VScode can't open git-rebase-todo
- Applying Git commits from one branch to another completely unrelated branch
- Is it safe to rebase remote branch if nobody based work on it?
- How do I avoid Git's `--fork-point` becoming confused by a retroactively created branch?
- Git rebase to squash commits reverts local to several commits prior
- How to re-use a branch of commits periodically?
- Git rebase undos all changes/commits to local branch
- Issue with including changes from a previous branch in the current pull request after merging another branch in Git
- git interactive rebase: reword without confirming each commit
Related Questions in TAGNAME
- Xpath select text without tagname, attribute
- SQL Server View to change structure
- How to get an element by tag name or id in Python and Selenium
- How to find the value of all the id attribute of all the button elements in a web page using Selenium
- Can the By strategy tagName be replaced with cssSelector for the same value?
- JS querySelectorAll function does not select intended css class
- expected_conditions.elementS_to_be_clickable((By.TAGNAME,'a'))
- element.tagName returns undefined
- scraping rotten tomatoes 12 years a slave movie
- Cheerio how to get the tag name of one element
- Is there a git max tag name length?
- How to get all Elements from Body in VB.Net Like as <Section>?
- Assigning tags by order to XML using ElementTree in Python
- How to wait until the src attribute is defined using Selenium and Python
- How to get the tagName's all parents in html by using JS?
Related Questions in GIT-TAG
- Bitbucket API to get the latest tag on a particular branch
- How to pull subrepo tag instead of branch?
- Similar git tags to trigger Github Actions
- To create a branch from a git tag is a good practice?
- Git tags moving from one remote branch to another
- Change contents of file in git history keeping tags
- Jenkins Pipeline Checkout to the latest release tag
- How to release Python package only if tag is from master branch
- Push tags to Bitbucket repository from Jenkins pipeline using withVault
- git describe not showing most recent tag as advertised
- How to get a tag from a branch in my repository using github actions?
- Deriving branch name in a Git CI/CD tag pipeline
- Why is a FetchContent using a different TAG than the one I specified? How can I resolve this?
- What files are left out of the tagged github zip?
- How to add labels to tag release in GitHub?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
No, there is nothing like a per-branch tag in git. All branches and tags are just kinds of refs in Git; a ref is just a name that points to a particular revision in the revision history. For instance, if you have
develandmasterbranches, andv1.0andv2.0tags, the references would look something like this:refs/heads/devel -> * / \ * * <- refs/heads/master | | * * \ / * <- refs/tags/v2.0 | * | * <- refs/tags/v1.0 | *As you can see, there's nothing tying those tags to any branches; in fact, all of those tags are contained in both the
masteranddevelbranches. By looking inside your.gitrepo, you can see that there is really no more structure to a tag than that; it is just a file containing a SHA-1 referencing a commit within.git/refs, or a line in.git/packed-refs(tags will frequently be inpacked-refsbecause they don't change often, while branches will usually be separate files withingit/refs).So if you want to rewrite history, and preserve the old tags, you will have to rewrite your tag names. As sehe points out, this is done using
git filter-branch --tag-name-filter.