Home » Should I keep my GitHub forked repositories around forever?

Should I keep my GitHub forked repositories around forever?

Solutons:


As of February 18, 2021, the “Unknown Repository” issue has been resolved. You should be ok to delete repositories once all the branches have been merged.


Old answer:

Deleting forked repositories will erase history from your Pull Requests.

PR with unknown repository

Deleting a forked repository will delete any information associated with your repository. This can retroactively affect any references to your repository, including pull requests that have already been merged. (See Pull request displays “unknown repo” after deletion of fork)

Your comments and commits should be preserved on any pull requests that were associated with your repository, but you will do so at your own risk.

However, deleting old branches after a merge is perfectly safe.

While deleting repositories should be avoided, deleting unused branches is perfectly acceptable. In fact, GitHub encourages you to delete old branches.

Tidying up after Pull Requests

At GitHub, we love to use Pull Requests all day, every day. The only trouble is that we end up with a lot of defunct branches after Pull Requests have been merged or closed. From time to time, one of us would clear out these branches with a script, but we thought it would be better to take care of this step as part of our regular workflow on GitHub.com.

Starting today, after a Pull Request has been merged, you’ll see a button to delete the lingering branch:

Delete this branch button

If the Pull Request was closed without being merged, the button will look a little different to warn you about deleting unmerged commits:

Delete branch with warning

Of course, you can only delete branches in repositories that you have push access to.

Enjoy your tidy repositories!

Alternatively, if you really don’t want to keep them around, you can archive a repository to indicate it is no longer actively maintained.

See also

  • GitHub Blog: Tidying up after Pull Requests
  • GitHub Blog: Deleting a repository
  • GitHub Help: Deleting and restoring branches in a pull request
  • GitHub Issues: Pull request displays “unknown repo” after deletion of fork

If your pull request got accepted and you haven’t made any other changes that you might use personally, you should delete it.

  1. Deleting doesn’t harm anything.
  2. You can always refork if you need to
  3. It cuts down on useless repos in search results when people are searching for something
  4. If you use your GitHub as a sort of resume for potential jobs/contracts, it looks better if you don’t have dozens of forked repos that you’re not currently working on. You’ll appear more efficient.
  5. It helps your own sanity when you don’t have to page through hundreds of useless repos.
  6. Its better for GitHub. 🙂

You can delete your fork as soon as you submit a Pull Request, regardless if it’s merged or not. GitHub stores all PRs in the upstream repository, meaning proposed changes are tracked even if the fork is deleted.

That simplifies the decision.

You may still want to keep the fork if:

  • You’ll be contributing more right away (e.g. extend existing PR or open new PRs)

You may want to delete the fork if:

  • You want a clean portfolio of projects under your name

Related Solutions

Split string into Array of Arrays [closed]

If I got correct what you want to receive as a result, then this code would make what you want: extension Array { func chunked(into size: Int) -> [[Element]] { return stride(from: 0, to: self.count, by: size).map { Array(self[$0 ..< Swift.min($0 + size,...

Retrieving n rows per group

Let's start with the basic scenario. If I want to get some number of rows out of a table, I have two main options: ranking functions; or TOP. First, let's consider the whole set from Production.TransactionHistory for a particular ProductID: SELECT...

Don’t understand how my mum’s Gmail account was hacked

IMPORTANT: this is based on data I got from your link, but the server might implement some protection. For example, once it has sent its "silver bullet" against a victim, it might answer with a faked "silver bullet" to the same request, so that anyone...

What is /storage/emulated/0/?

/storage/emulated/0/Download is the actual path to the files. /sdcard/Download is a symlink to the actual path of /storage/emulated/0/Download However, the actual files are located in the filesystem in /data/media, which is then mounted to /storage/emulated/0...

How can I pass a command line argument into a shell script?

The shell command and any arguments to that command appear as numbered shell variables: $0 has the string value of the command itself, something like script, ./script, /home/user/bin/script or whatever. Any arguments appear as "$1", "$2", "$3" and so on. The...

What is pointer to string in C?

argv is an array of pointers pointing to zero terminated c-strings. I painted the following pretty picture to help you visualize something about the pointers. And here is a code example that shows you how an operating system would pass arguments to your...

How do I change the name of my Android device?

To change the hostname (device name) you have to use the terminal (as root): For Eclair (2.1): echo MYNAME > /proc/sys/kernel/hostname For Froyo (2.2): (works also on most 2.3) setprop net.hostname MYNAME Then restart your wi-fi. To see the change, type...

How does reverse SSH tunneling work?

I love explaining this kind of thing through visualization. 🙂 Think of your SSH connections as tubes. Big tubes. Normally, you'll reach through these tubes to run a shell on a remote computer. The shell runs in a virtual terminal (tty). But you know this part...

Difference between database vs user vs schema

In Oracle, users and schemas are essentially the same thing. You can consider that a user is the account you use to connect to a database, and a schema is the set of objects (tables, views, etc.) that belong to that account. See this post on Stack Overflow:...

What’s the output of this code written in java?

//if you're using Eclipse, press ctrl-shift-f to "beautify" your code and make it easier to read int arr[] = new int[3]; //create a new array containing 3 elements for (int i = 0; i < 3; i++) { arr[i] = i;//assign each successive value of i to an entry in...

How safe are password managers like LastPass?

We should distinguish between offline password managers (like Password Safe) and online password managers (like LastPass). Offline password managers carry relatively little risk. It is true that the saved passwords are a single point of failure. But then, your...

Can anyone tell me why this program go to infinite times?

while (i <= 2) { while (i > 0) { a = a + b; i--; <- out the inner while loop when i = 0 } printf("%d", a); i++; <- at here, the i==0 each time, so infinity loop } Because your nested loop always restores the value of i to 0, And 0 <= 2 is always...

How to conditionally do something if a command succeeded or failed

How to conditionally do something if a command succeeded or failed That's exactly what bash's if statement does: if command ; then echo "Command succeeded" else echo "Command failed" fi Adding information from comments: you don't need to use the [ ... ] syntax...

How to turn JSON array into Postgres array?

Postgres 9.4 or newer Obviously inspired by this post, Postgres 9.4 added the missing function(s): Thanks to Laurence Rowe for the patch and Andrew Dunstan for committing! json_array_elements_text(json) jsonb_array_elements_text(jsonb) To unnest the JSON array....