Some shops mandate checking in long, autogenerated files into source control that clutter up BitBucket pull request pages with large diffs, leaving you to scroll epic distances or depend on the top navigation to visit files key to a code review.

Despite at least three different tickets dating back to 2014 asking Atlassian to support excluding specific file diffs from pull request pages, a John Garcia explained why they would not implement this feature:

This response is reasonable for the referenced case, yet unhelpful to users as a whole. Even if the people referenced in the conversation were using source control inappropriately by tracking files that they should not track, others reviewing code might not be in a position to change that. Then there are big (as in, often has diffs that take up at least one screen) autogenerated files that frequently change, aren't normally worth reading and should be in source control, such as yarn.lock. Citing a StackOverflow answer addressing one case with 11 votes at the time of this writing does not make the feature request unjustified.

I had the same problem as the people supporting the ticket (with many yarn.lock files, no less) so I wrote a userscript creatively named "Hide Annoying BitBucket Diffs (HABD)." It's set to execute when you view a pull-request page powered by BitBucket. The script does not support binary files. Installation instructions are at the bottom of this article.

In order for this script to function, you will need to configure a couple of things. Thankfully it's quick!

You can control what diffs to remove by referencing a plain text resource listing one regular expression per line (Pointing to a raw Pastebin helps here). A diff is removed from the pull request page if the filename corresponding to that diff matches ANY of the expressions in the resource. 

For example, this resource hides file diff blocks for package.json and yarn.lock, both of which are common in Node projects and are checked into source control.


If we're clear up to this point and you want to use the script, let's get you set up. If you encounter any problems, please report an issue.

Script installation for TamperMonkey

  1. While using Chrome, add TamperMonkey.
  2. Go to HABD's page on and click "Install." You will see the source code and a confirmation. Confirm the installation.
  3. Click the Tampermonkey icon in Chrome and click "Dashboard." You will see a list of installed scripts.
  4. At the far right of the row where you see HABD, you will see a little notepad icon. Click that to edit the script.
  5. Change the line starting with "@resource" to point to a raw PasteBin or some other clear text resource with one regular expression per line. The link already in the script points to an example. Remember that the regular expressions match against filenames. If ANY of the expressions match, the diff is removed from the page.
  6. (Optional) Change the line starting with "@match" so that it matches only the pages in which you review BitBucket pull requests.
  7. (Optional) If you want to hide diffs on both pull request and commit pages, use the @include rule to add another URL matching pattern.

Script installation for GreaseMonkey

  1. While using Firefox (or some other supported browser), add GreaseMonkey.
  2. Go to HABD's page on and click "Install." You will see the source code and a confirmation. Confirm the installation.
  3. Click the arrow next to the GreaseMonkey icon in Firefox and click "Manage User Scripts." You will see a list of installed scripts.
  4. On the row for "Hide Annoying Bitbucket Diffs", click "Preferences," then "Edit This User Script."
  5. Change the line starting with "@resource" to point to a raw PasteBin or some other clear text resource with one regular expression per line. The link already in the script points to an example. Remember that the regular expressions match against filenames. If ANY of the expressions match, the diff is removed from the page.
  6. (Optional) Change the line starting with "@match" so that it matches only the pages in which you review BitBucket pull requests.
  7. (Optional) If you want to hide diffs on both pull request and commit pages, use the @include rule to add another URL matching pattern.

I'm a survivor. Not of sexual assault, not of domestic abuse, but of attempts to destroy my future and every aspect of life I hold dear: false allegations of crime. If only I was a victim of something else, because maybe then the people who set their sights on me would not have been allowed to take their shot.

I want you to imagine struggling to prepare for midterms and hold down a job to pay for your increasing student loan debt. I want you to feel the pressure of finally getting your degree, and the joy of having friends nearby to help let go of your worries.

And then a letter comes from campus legal counsel. It says that you are under investigation for harassment. Maybe sexual assault. Maybe vandalism. Does it matter? You know you didn't do it, but a sinking feeling in your chest says that's not for you to decide.

Detectives and counselors interview you to assess if you are a threat. You don't know who called the cops, let alone why they did it. But you are starting to realize that it's because they don't want you here. You are clearly frustrated. Scared. Angry. Clearly harboring guilty thoughts, according to some.

Then comes the hearing. There is a strong, thick air of judgement in the room.

It's decided that you are to leave campus.

So you leave it all behind. Your progress, your career, and your dreams didn't matter. All thanks to a lie from the ether.

You wish that someone would take a second look. Maybe someone actually was hurt, and you were mistaken for someone else. Maybe a dangerous criminal is still out there.

But does it matter? You are the accused, not the victim.

Victims need justice.

Because its supposed to be their story.

Not yours.

Please support Georgia HB 51 to establish due process in post-secondary institutions, and to make sure only criminals face justice. Contact your representative and encourage them to protect the falsely accused alongside the victims.


If your child went to college and was expelled for something he or she didn't do, would you want the same to happen to other people's children? The question may be rhetorical, but it's a real one that citizens of Georgia will have to answer to determine the future of due process in higher education.

Georgia legislators are considering a bill (HB 51) that would add a layer of due process on university campuses that was once missing. HB 51's sponsors include Earl Erhart, Rich Golick, Regina Quick and Trey Kelley. The bill has passed a subcommittee hearing, and at the time of this writing is approaching the full Appropriations Committee. If this passes, the bill hits the floor and starts over with the senate.

You can read the current version of the bill here. In my probably oversimplified summary, the bill suggests that it is not up to post-secondary (i.e. university) staff to do a cop's job when faced with a criminal allegation. As it stands in many states today, if someone were to accuse you of a major crime, you may face disciplinary action leading all the way up to expulsion even if you were innocent. Some examples of concerning conduct happened at Brandeis, Duke and UND. Organizations such as FIRE or Title IX for All have sections of their websites dedicated to horror stories of innocent or innocuous students facing needlessly punitive action across the country. Brandeis in particular is an example of one action (a man kissing his partner awake) blowing up into a massive, questionable retaliation:

Big update to our story nearly a year ago about a gay student expelled by Brandeis University based on sexual-assault allegations that included kissing his sleeping boyfriend, the accuser:

A federal judge in Boston has put Brandeis on notice that its investigative procedure lacked “basic fairness” to such an extent that it might have affected the outcome.


Brandeis must justify several of its practices, including the denial of cross-examination, the use of a single-investigator model, the refusal to provide the accused the specific allegations against him, and the suspicious use of the “more likely than not” evidence standard only in sexual-misconduct proceedings, whose results can have lifelong, severely negative consequences for the accused student.

Greg Piper, Associate Editor of the College Fix “Federal judge validates due-process lawsuit against Brandeis by student accused of rape”

While the scope of this bill applies only to Georgia, its important to set an example for due process and the presumption of innocence. If this does not happen, it is possible that you, as a student, may be expelled for an innocuous action, if there is any action at all.

The point of this bill is to help protect the presumption of innocence on post-secondary institutions, so that innocent students don't have a kangaroo court experience after a rival accused them of academic, sexual or other misconduct—either real or perceived. It starts tying a university's handling of criminal allegations to the police departments that have jurisdiction. That way professors, administrators and on-campus committees do not act as the judge, jury and executioner.

Just so you know my position, I'm a recent graduate of Kennesaw State University that desperately wished this bill was law when I was a student. Since my struggles on campus (that I don't wish to recount here), a gained a passion for helping plug leaks in the judicial system as it overlaps with higher education. I've previously spoken out against the Campus Accountability and Safety Act (S.590) for the consequences it would bring to campus cultures that are strongly divided on perceptions of gender—namely than a male student accused of sexual assault is doomed, even if he is innocent.

Today I went to visit the Georgia State Capitol with local attorney Charles Jones to speak to various representatives in support of the bill. We passed out key details on the benefits of due process and were delighted to see so many in favor of the bill within the house appropriations committee, although one informed us that the opponents of the bill send negative and sometimes downright threatening emails to their representatives. This isn't to speak poorly of the bill's opponents, but to share with you all the passion and anger that the representatives saw in the opposition.

The detractors of the bill appear to believe that adding additional due process makes it harder for victims to find justice. Their perception, as I understand it, is that by presuming innocence, you are presuming a victim making a report to the police is lying.

This could not be further from the truth.

The supporters of the bill I've encountered are perfectly aware of the pressing need to maintain an efficient line of communication between a victim and the authorities. Even if they wanted to curtail victims, they cannot contradict the Clery Act, which basically makes reporting a threat on campus much easier than before it was passed.

The point of this bill is to make sure that in the event a criminal allegations comes forward on campus, the victim will get justice by helping make sure the authorities capture the right person. If you have ever seen documentaries like Making a Murderer or West of Memphis, you know how bias and an impatient rush to convict can destroy entire families.

Support for HB 51 is not about making it harder for victims to find justice, it makes sure one person's justice is not another person's oppression. That being said, finding the truth and delivering justice takes often a frustrating amount of time for the victim, if it comes at all. I really do understand that frustration, but rushing to judgement only serves to gratify bias and impatience.

We've already allowed the impatient and the biased to adjudicate criminal allegations on campus, and it hasn't been working. Title IX for All now lists 170 lawsuits (login required) filed by students against those unqualified to handle criminal allegations.

We need to install due process to make sure that no more innocent people are hurt, and that a torch and pitchfork mob does not decide who deserves punishment. Otherwise, we risk innocent people facing wrongful conviction, wrongful discipline, and even turning around and responding with a lawsuit that rips taxpayer dollars out of the school to make things right while real culprits possibly still run free. In this situation, everyone loses.

Since I am not an attorney I cannot claim to interpret the bill or its implementation as well as its sponsors. My understanding is that post-secondary institutions can still evaluate the accused as a potential threat to campus and possibly color the reports sent to police departments as the bill mandates. But even then, that's probably not something you can legislate directly and this bill is better than what we have. The bill is still under consideration.

If you live in Georgia, look up your representatives and send them an email voicing your support of the bill. You may find more success in sending emails that have a strong positive, grateful or congratulatory tone, such as "Thank you so much for any support for HB 51."

An example email is below that you can use to contact your representative. Feel free to alter it as you see fit.

Dear [Representative],

I want to thank you so much for your consideration of HB 51 regarding the treatment of criminal allegations on post-secondary institutions. I understand you have faced a lot of opposition to the bill from those who feel they are doing the right thing by expediting justice, but I applaud your courage for any efforts you make to ensure due process where it is missing.

If you have not already done so, please support HB 51 to establish a more consistent and functional judicial system as it reaches into universities and our students' futures.

Best regards,
[Your name]

Even if you are not a resident of Georgia, please at least prepare a nice note and contact a Georgia state representative to voice your support and congratulate them on making a courageous stand for principles consistent with the Constitution. It's not often we see much respect for that document, so reward every small revival of its spirit. To better manage the traffic coming into representatives' inboxes, I will not publish email addresses here (although they are public should you wish to look them up). However, I am maintaining a list of representatives to connect with constituents so please feel free to ping me on Facebook and I will connect you with public contact info.