
Think Twice Before Downgrading to a Free GitHub Account - ingve
http://blog.jaredsinclair.com/post/183676881105/think-twice-before-downgrading-to-a-free-github
======
wikwocket
For what it's worth, protected branches are pretty clearly listed as a "Github
Pro" feature in their pricing page.

I agree that it'd be nice if they warned you about features you're using that
will be turned off, but I don't think it's unreasonable to expect that people
requesting downgrades understand which features are in which plan.

Maybe this could be suggested to GitHub's Paperclips project, to avoid future
confusion?

~~~
Ensorceled
Agreed. But there were a lot of people celebrating GitHub’s recent free
account changes who were saying you no longer needed the pro account; this is
a good reminder that you may need the pro account after all and do that check.

~~~
giancarlostoro
Downgrading an account for free should always be treated the same as upgrading
an account for money. You gotta consider what you gain and lose in doing so
before pulling the trigger without looking first.

------
dustinmoris
Did someone really just write a blog post on not downgrading an account
without knowing what you're doing? Yes, you should not do that. You also
shouldn't buy something without knowing what you're paying for, shouldn't vote
for something you don't know what it is, you shouldn't eat stuff which might
be poisonous but don't know for sure, you shouldn't cross a street without
looking, gosh you certainly shouldn't drive a car with closed eyes not knowing
where you're driving. Let's remind everyone of these things regularly, as this
stuff is apparently not obvious anymore in 2019.

~~~
Shish2k
> shouldn't vote for something you don't know what it is

Isn't the whole point of democracy "a large enough volume of ignorance will
average out to something sensible"? :P

~~~
barry-cotter
No, it isn’t. The hope is that the ignorance averages out and the informed and
motivated voters are the decisive factors. In practice democracy works better
than if that model was correct because while voters have preferences that they
will happily profess that reliably lead to bad outcomes they reliably vote out
parties that are in power when things go badly. Politicians have an incentive
to do things that will get them re-elected so gross economic mismanagement is
not the order of the day, mostly.

~~~
dragonwriter
> they reliably vote out parties that are in power when things go badly.

That's not at all the case, and even to the extent it is it is frustrated in
separation of powers systems like the US, where the faction voted out will
often be the one _least_ responsible for the problems, since three are
multiple factions in power at any given time a day the ignorance leads to
blaming the wrong one.

~~~
barry-cotter
What I wrote was too strong, you’re right. If there’s a huge fuckup the
part[y|ies] in power are very likely to be voted out, the smaller the mess the
less likely they are to be voted out, and that’s complicated by the tendency
to want to throw the bums out when the incumbent government has been in power
a long time. I agree entirely that fixed legislative terms and term limits are
stupid ideas, along with separating the legislature and the executive.
Parliamentary systems are better than presidential ones.

------
moviuro
FWIW, Branch protection looks like it's a free feature on Gitlab [0]

[0]
[https://docs.gitlab.com/ee/user/project/protected_branches.h...](https://docs.gitlab.com/ee/user/project/protected_branches.html)

~~~
dsumenkovic
That's right, it's available in both free (SaaS) and core( self hosted) tiers.

------
sli
If your account is downgraded automatically, Github will extort you for access
to your private repositories. You don't get the option to just set them to
public and stay on the free tier, Github simply forces you to pay up to get
them back or lose them permanently.

Found this out when my old student account lapsed after I left college.
Luckily, they screwed up and unlocked my private repos when attempting to
charge me (there was no credit card on my Github account and never was -- nice
work, Github) and I was able to pull my private repos and move everything to
Gitlab.

Zero regrets. Extortion is never acceptable, _especially_ when it's policy.

~~~
oliwarner
I assume this is distant history.

Free accounts are now allowed unlimited numbers of private repos with limited
collaboration.

But I would also not classify as removing access when you stop paying as
extortion. You know when your account is paid up to. You would therefore know
when you'd have featureful access to. It's not their fault you can't plan
ahead is it?

~~~
kevin_b_er
It was a student account. It was not "paid up to" because it was a student
account.

------
eugeniub
I'm seeing people here chastising the OP for not fully knowing what he was
getting into. But in all the excitement about the new free plan with private
repos in January, GitHub failed to highlight other differences between the new
free plan and the rebranded Pro plan.

We can blame the end user all we want, but GitHub could have prevented all of
this.

------
floatingatoll
OP: Thanks for writing this up. I emailed your post as a downgrade UX bug
report to GitHub Support. Hopefully they agree and fix it.

------
pstadler
Hosting private repositories on GitHub pages is another feature only available
with the Pro plan. Figured this one out a few days after canceling my
subscription.

~~~
eugeniub
I figured it out on the day my subscription lapsed, and someone created their
own repository using my domain in their CNAME file. I had to wait until GitHub
banned the user until I could set up the domain with GitHub Pages again.

------
latchkey
> I live in mortal fear of making a dumb mistake and losing irreplaceable
> source code.

Then store backups of your repositories somewhere else than GitHub.

~~~
johnchristopher
Exactly. Git and github aren't backup tools. I always feel like github (and
others) added to the git workflow things that are bolted on top of it and tie
you to their platform.

~~~
stkdump
Slightly offtopic, I have always considered a strange failure of git that
branches are second class citizen in git, not worthy of the same versioning
mechanisms as files. It is not unreasonable to expect a versioning system to
be able to track the history of branches. And if I don't want to loose a file,
just because it was deleted some time in the past, surely I also don't want to
loose a branchjust because it was deleted. I don't buy the 'I want to be able
to hide f-ups' argument.

~~~
jsmeaton
Doesn’t the reflog serve that purpose though? Branches are just labels for a
commit, and all commits (and names) are visible in the reflog.

~~~
stkdump
Come the next garbage collect, the file changes in a deleted branch are
forgotten. If I don't want to loose changes, garbage collect shouldn't be a
thing, because there is no garbage, just history.

~~~
Thiez
As I recall the GC will only touch things that have been deleted for some time
(a month?), that's a long time to correct accidental deletions.

Garbage is created every time you amend or rebase. What is the value of
keeping around commits that are unreachable through any branch, containing
typos in the commit messages?

It seems to me that source control can really bring out the hoarder in people,
a fear of throwing away anything because you might need it later. I prefer it
when the commits in a repo tell a story, but keeping everything that didn't
end up on the master branch... why?

~~~
stkdump
> As I recall the GC will only touch things that have been deleted for some
> time (a month?), that's a long time to correct accidental deletions.

That is what I mean by second class citizen. The same logic doesn't apply to
deleted files in a branch. If I delete a file it may not be accidental at all,
and still I expect it to be accessible and not be considered 'orphaned',
'garbage' or similar. Why doesn't git throw away everything that is older than
90 days? (the default for gc)

------
d2p
I downgraded too, and noticed GitHub Pages stopped working (the content is
still there, but they don't rebuild - although they did for a little while
after downgrading). It is clearly marked as a Pro feature, I just hadn't
considered that the free private repos would be more restricted.

It's not a big deal to me, I'll probably just make the repos public.

~~~
leethargo
I have a free GitHub account and also have GitHub Pages for my blog, which is
developed in one of my public repos.

Do you mean some specific additional features for GitHub Pages, such as a
vanity URL, or building from private repos?

~~~
d2p
Just private repos. When you look at the GH pages section it says "Make this
repo public to enable GH Pages" or something. Your existing site still serves,
but it doesn't build anymore.

------
aequitas
To some it might seem weird, but in cases like this having even your
repository configuration in Configuration management makes sense, for example
using Terraform[0]. Of course you have a chicken-egg problem for that first
repo that actually contains your CI code. But if you just apply common sense
that problem doesn't really exist.

With repositories it is just so easy for little configuration drift to slip
in. A branch you forgot to protect. A user/group that should no longer have
write permissions, etc.

[0]
[https://www.terraform.io/docs/providers/github/r/branch_prot...](https://www.terraform.io/docs/providers/github/r/branch_protection.html)
[https://www.terraform.io/docs/providers/type/vcs-
index.html](https://www.terraform.io/docs/providers/type/vcs-index.html)

------
amelius
I think it's stupid that GitHub stores (meta-) data in a place that's not
governed by git. Everything should be in git.

~~~
copperx
Are you suggesting that GitHub should fork git to add new features?

~~~
ebg13
Not needed. They already know how to use special repo branches for special
things. See e.g. gh-pages and yourproject.wiki.git. They could _trivially_
have yourproject.issues.git etc, except that not doing that gives them a
competitive moat making it harder to migrate away.

------
thrownaway954
honestly though... how many everyday devs actually use something like this?

~~~
giancarlostoro
If you have a job where you arent allowed to commit directly to master /
development branches this is probably how they enforce it. It keeps juniors
from pushing bad code without peer review. It forces developers into doing PRs
instead. Protected branches are the first thing we setup when we make a new
repository at work once we hit the "getting good enough for production and
autobuilds" stage of development.

~~~
jsjohnst
> It keeps juniors from pushing bad code without peer review.

It keeps _all developers_ from pushing _code_ without peer review.

(In my experience, it’s just as often senior devs pushing broken code because
“this was a simple change, why does it need review?” and it in fact being
broken. Furthermore, doing PRs is not solely to “check for mistakes”, they are
also used for knowledge sharing, among other reasons)

~~~
giancarlostoro
> It keeps all developers from pushing code without peer review.

This is true, I don't know why I went with juniors.

~~~
marmaduke
Because junior is a state of mind not an age

------
SeriousM
Gitlab has private repos for free and the service is imho on par with github

~~~
giancarlostoro
As does BitBucket which I prefer just because it matches what I use at work. I
also keep a GitLab for backup type reasons.

~~~
ketzu
Also Bitbucket supports mercurial repositories, which is a shame has so little
support on the other big platforms.

~~~
paol
Git won though. I'm not especially a fan of git, but at this point advocating
for mercurial is tilting at windmills.

~~~
ketzu
Git won in the same sense that chrome won or windows won, there's value in
having alternatives and I would like to have the option of mercurial in more
settings.

I am not advocating for use of git or mercurial, use whatever suits your
needs! But I think having a platform like bitbucket support alternatives to
git is a big plus for developer freedom to chose.

~~~
giancarlostoro
I think another interesting VCS is probably Fossil. It's very self-capable and
self-contained. I wish it were a little more commonly used, but git or
mercurial is where it's at I suppose. I keep meaning to use mercurial more,
maybe I should for my BitBucket projects, it's not like it makes much
difference since JetBrains IDE's handle the under the hood version control
commands.

------
reledi
There is less risk without protected branches than you think, especially if
you catch and contain the problem early.

GitHub allows you to restore branches and commits are restorable from the ref
log.

------
jayeshsalvi
There is a more serious impact of downgrading if you were hosting a static
website from a private repository on github with a pro account. Apparently
that's not supported with free account. My personal website went down as soon
as I downgraded to free. I didn't mind making the repo public, so it was an
easy fix, but may not be same for others.

------
natfriedman
Jared is right that we should alert users about this before they downgrade.
We’ll add some UI for this.

[https://twitter.com/natfriedman/status/1109880047207235589?s...](https://twitter.com/natfriedman/status/1109880047207235589?s=21)

------
theshadowmonkey
Using gitlab and bitbucket for my personal repos on their free tiers have
solved a lot of problems for me. Also, a lot of features are way ahead of
github on these 2 platforms including CI/CD, Code reviews, and other tooling.

------
el_dev_hell
I am so glad I read this before downgrading.

Sorry to hear!

------
ddtaylor
Does this mean free accounts cannot have private repositories?

~~~
richardwhiuk
They can have private repos - it's just branch protection rules which are no
go.

~~~
gnicholas
I think private repos are also limited to just a few (3, IIRC) contributors.

------
sigi45
What? What is he doing that it makes him fear code loss?

~~~
progval
git push --force

It doesn't actually delete the commits, but you can't find them anymore if you
don't remember the hash of the former head commit of the branch

~~~
ComputerGuru
`git reflog` is your friend; provided not too many operations have since
passed.

