Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kill: remove the content of the killed branch from its descendents #2388

Open
kevgo opened this issue Aug 21, 2023 · 1 comment
Open

kill: remove the content of the killed branch from its descendents #2388

kevgo opened this issue Aug 21, 2023 · 1 comment

Comments

@kevgo
Copy link
Contributor

kevgo commented Aug 21, 2023

Assuming I have this branch hierarchy:

branch-1
 \
  branch-2
   \
    branch-3

I decided that branch-1 was a bad idea and I want to remove it. If I run git town kill branch-1, it removes branch-1 from the lineage. But branch-2 and branch-3 still contain the changes that branch-1 makes, and shipping branch-2 will also ship the changes from branch-1.

To fix this, git town kill should also revert the changes from branch-1 from the other branches.

Maybe only do this if a switch like --revert is provided.

@kevgo kevgo changed the title remove a branch from a branch lineage kill: remove a branch from a branch lineage Aug 22, 2023
@kevgo kevgo changed the title kill: remove a branch from a branch lineage kill: remove the branch from the entire branch lineage Aug 22, 2023
@kevgo kevgo changed the title kill: remove the branch from the entire branch lineage kill: remove the content of the killed branch from its descendents Apr 14, 2024
@nishchay-manwani-glean
Copy link
Contributor

Up until this is added, what would be the easiest workaround right now?
Currently I do

  1. git town switch to branch-1
  2. git compress
  3. git revert on the commit hash generated
  4. git sync --all
  5. git kill

I was wondering if there is any easier way which anyone might be using?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants