Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to hide Force Push actions in a pull request on GitHub?

Recently, GitHub made it so that force pushes are displayed in the pull request change history. I like to rebase my branches often (every couple hundred commits) to avoid compatibility issues, so now all of my pull requests look like this:

enter image description here

This is just clutter, is there any way that I can hide this? If not, where can I submit a feature request to GitHub.com itself to get these force push notifications to optionally go away?

like image 713
Aaron Franke Avatar asked Nov 19 '18 20:11

Aaron Franke


People also ask

Can you force push in a pull request?

While you can send pull requests from any branch or commit, with a topic branch you can push follow-up commits if you need to update your proposed changes. Be very careful when force pushing commits to a pull request. Force pushing changes the repository history and can corrupt your pull request.

What prevents force pushes in git?

Use Protected Branches By default, GitHub will block force pushes on all protected branches, so you will just need to decide which branches should be protected. You can read GitHub's documentation to learn how to create a branch protection rule.

How do I restrict a push in GitHub?

On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings. Under "Pushes", select Limit how many branches and tags can be updated in a single push. Enter the number of branches and tags you want to limit in a single push.


1 Answers

Unfortunately it doesn't seem possible to hide them, all my pull requests are now a mess of force pushes too.

like image 143
Shaun Dreclin Avatar answered Oct 08 '22 00:10

Shaun Dreclin