Code Monkey home page Code Monkey logo

git-rebasetags's People

Contributors

nachoparker avatar terratech avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

git-rebasetags's Issues

Rebase branches also

It's pretty common in our workflow that we need to rebase a branch and then, after the rebase we need to manually move all the branches that were left behind on the no the old commits. Is it possible to change this script to rebase branches also, the same as it rebases tags?

Not moving tags in WSL

I'm running Ubuntu 18.04 inside WSL and the rebase itself works fine, but moving the tags fails.

Does not transfer all relevant tags after a rebase

While I really like git's rebase ability, it falls down when dealing with existing tags and this has bugged me since I started using git a few years ago. Tonight I had to refactor a large library and move some branches/files/folders around. This repo had a lot of version tags and I really didn't want to suffer the pain of manually retagging the commits like I've done in the past.

Anyhow, I tried several different scripts I've found, and git-rebasetags was the only one that had the most success. Unfortunately, it got to the 1 yard line, but didn't make it into the endzone.

To illustrate, I will keep this as simple as possible:

$ mkdir foo
$ cd foo
$ git init
$ git config alias.brga log --graph --pretty=oneline --abbrev-commit --decorate --all --date-order
$ git commit --allow-empty -m"epoch"
$ z=a; echo $z>$z; git add $z; git commit -m$z; git tag t${z}
$ git checkout -b z
$ z=n; echo $z>$z; git add $z; git commit -m$z; git tag t${z}
$ z=o; echo $z>$z; git add $z; git commit -m$z; git tag t${z}
$ git checkout master
$ z=b; echo $z>$z; git add $z; git commit -m$z; git tag t${z}
**Now look at the overall commit tree
$ git brga
**Now we want to rebase branch z and bring it current to master
$ git checkout z
$ git-rebasetags master
**It should say that tag 'tn' was remapped and a warning that 3tags without a match
**Look at commit tree again
$ git brga

At this point, you will find that tag 'tn' was handled correctly, however tag 'to' is still on tip of dangling branch and was not applied to the tip of branch 'z'

Your thoughts on this would be appreciated.

[rant] Why this isn't an optional ability that git rebase (proper) has is beyond me, because that is the most opportune time to shift tags is when the old=>new sha1 mappings list is currently in play [/rant]

RFC: Adding Author and AuthorDate as matching criteria

While updating the large library, I found that several tags were misapplied due to having the same commit message.

In my case, I had added tags to 'go fmt'.

A lot of times, while hacking on Go code, I'll incrementally commit my changes, and when I'm ready to tag it, I'll run:

$ go fmt
$ git commit -a -m"go fmt"
$ git tag 1.2.3

I do it this way, as the prior commit shows just specifically the changes I made, where when 'go fmt' is run it can adjust a lot of non-related code with formatting changes.

Unfortunately, this will cause problems for git-rebasetags. My ideas is to also use Author and AuthorDate as matching criteria as that shouldn't change during rebases.

$ git log --pretty=fuller

What do you think about this and possibly other seldom-to-change items from the commit message? I know Author* items can be changed in history, but for the most part it would add an extra level of matching criteria that should increase the success rate.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.