Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Remove references from amended commits after rewriting history #1081

Open
vermiculus opened this issue Oct 1, 2017 · 4 comments
Open

Remove references from amended commits after rewriting history #1081

vermiculus opened this issue Oct 1, 2017 · 4 comments
Labels
cross referencing Interlinking between issues, prs, commits, etc issues

Comments

@vermiculus
Copy link

vermiculus commented Oct 1, 2017

Creating this issue after contacting GitHub support:

My question is very similar to https://stackoverflow.com/q/21983964/1443496. If you take a look at cask/cask#399, I've unwittingly dirtied that issue with a bunch of references to commits that, at least conceptually, should no longer exist. These references were made using functionality described here, but when it was proved the change (say, commit A.1) didn't actually fix the issue, I amended the commit and re-pushed (--force-with-lease) commit A.2. The new commit (A.2) does appear on the issue, but A.1 also still appears.

Is there any way I can remove A.1?

I often find myself in this situation -- is there anything I can do going forward to cleanup this issue when it happens again? This isn't uncommon on my development branches (which I need to push for CI's sake).

Hi Sean,
It's not possible to remove issue references from the issue timeline. I'll definitely pass that along to the team as a feature request though!In the meantime, you could stick to only referencing issues in PRs that you push your commits to instead of referencing the issue in the commit message itself. Does that workaround work for you?
Best,
Shawna

I can understand the desire to leave the commit around in GitHub's history for reference when the commits are significantly different, but there are clearly cases where this isn't the desired behavior. My suggestion would be some sort of UI on the reference itself to disassociate that commit with the issue.

For example, if commits A.n reference octocat#12, it should be possible to visit octocat#12 and disassociate each commit A.nk from the issue. I admit this would be tedious for instances where many commits were created, but I can't think of a better way to do it that's guaranteed to not overdo it (and it's my own fault for making a mess).

@vermiculus
Copy link
Author

My reply (for reference):

Good to know it's not possible at present, at least! Your workaround (as-is) won't work for my case since I don't use GitHub's PR workflow all that much, but my current workaround (which is essentially the same thing) of not mentioning the issue/entity until the commit has 'stabilized' is working for now – if not dangerously easy to forget.

@bdrazen
Copy link

bdrazen commented Sep 16, 2018

Any developments on this? Pretty annoying. 😕

@rafasc
Copy link

rafasc commented Nov 7, 2018

Now that #253 has been addressed, maybe this one will get some traction.

The motivation for this one should be pretty much the same what @nat mentioned when announcing the feature that allowed closing #253 (comment).

@clarkbw clarkbw added issues cross referencing Interlinking between issues, prs, commits, etc labels Nov 7, 2018
pzhlkj6612 added a commit to pzhlkj6612/kitauji-gwent that referenced this issue Oct 14, 2020
Drop 'sprity' and its dependencies, use 'gulp.spritesmith-multi'.

The plugin 'sprity' is great, but its dependencies are so complicated [1].

And then,
> That library can be replaced by the spritesmith toolkit which aims
to do the same task. [2]

Attention!
> If your img pipeline requires 'Buffer' contents, then this can be remedied via 'vinyl-buffer': [3]

npm 6.13.4 (node 8.17.0) generated 'package-lock.json', so track its changes [4][5].

[1] [Failed to install with node7: ZLIB_VERNUM != PNG_ZLIB_VERNUM · Issue #297 · EyalAr/lwip](github.com/EyalAr/lwip/issues/297)
[2] [Change sprity/sprity-gm with spritesmith/gmsmith by goonode · Pull Request #757 · google/material-design-icons](github.com/google/material-design-icons/pull/757)
[3] [gulp.spritesmith  -  npm § Breaking changes in 6.0.0](https://www.npmjs.com/package/gulp.spritesmith#breaking-changes-in-600)
[4] [npm-package-lock.json  |  npm Documentation](https://docs.npmjs.com/files/package-lock.json)
[5] [npm install not creating a new package-lock.json - Stack Overflow](https://stackoverflow.com/questions/45866533/npm-install-not-creating-a-new-package-lock-jsonc)

---

Let's embrace Node.js 8! (not 10 or 12 because gulp 3 does not support them)

---

I'm sorry for a bunch of references (in EyalAr/lwip and google/material-design-icons) from amended commits after rewriting history. [6]

[6] [Remove references from amended commits after rewriting history · Issue #1081 · isaacs/github](github.com/isaacs/github/issues/1081)
@Broxzier
Copy link

Broxzier commented Aug 3, 2021

Almost 4 years have passed since this issue was created, and I still bump into issues being references by rebased commits, clusting the issues up completely and no way to remove these mentions. Just being able to manually remove these references from the issue timeline would be perfect.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cross referencing Interlinking between issues, prs, commits, etc issues
Projects
None yet
Development

No branches or pull requests

5 participants