9 ms·
Think Twice Before Downgrading to a Free GitHub Account
- latchkey 8y ago> 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 8y agoExactly. 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 8y agoSlightly 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.
- chrisweekly 8y agoDon't lose sight of the simple fact that in git, a branch is just a name. In the end, it's all about commit(ish)s.
- jsmeaton 8y agoDoesn’t the reflog serve that purpose though? Branches are just labels for a commit, and all commits (and names) are visible in the reflog.
- simplehuman 8y agoreflog is local only
- stkdump 8y agoCome 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.
- black-tea 8y agoYou can disable automatic garbage collection if you want to. You could also have "versioned branches", but you'd have to do it yourself, using either branches or tags. Tagging the head of a branch just before you rebase would do it. Also, the spelling is "lose".
- Thiez 8y agoAs 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 8y ago> 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)
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- black-tea 8y agoIt amazes me how many people just don't grasp the "distributed" part of git. No repository is special and it's trivially easy to make a new one somewhere.
- syshum 8y agoBut it is in the cloud this means never having to worry about backups /s
- leokennis 8y agoIndeed. I consider any file I don’t have at least on two pieces of on equipment that I own (computer, NAS, external HDD etc.) to be already gone. Cloud backup (Backblaze etc.) is for when my house is on fire. But the only backups I actually trust are the ones that I have 100% control over.
- el_dev_hell 8y agoI am so glad I read this before downgrading. Sorry to hear!
- floatingatoll 8y agoOP: Thanks for writing this up. I emailed your post as a downgrade UX bug report to GitHub Support. Hopefully they agree and fix it.
- wikwocket 8y agoFor 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 8y agoAgreed. 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 8y agoDowngrading 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.
- endergen 8y agoI read this post as a sharing of a confusion/assumption made. Not everyone reads fine print or manual, but ha will read HN.
- xtracto 8y agoInteresting, protected branches come free in GitLab. I never used Github to host my serious repos (I was using Bitbucket as soon as they started providing Git in addition to Hg). I would suppose that as time passes by, Microsoft will improve the free offering avaialable on their service.
- dsumenkovic 8y agoHere's the link if anyone wants more details https://docs.gitlab.com/ee/user/project/protected_branches.html https://docs.gitlab.com/ee/user/project/protected_branches.h.... It's available in both Core and Free tiers.
- ddtaylor 8y agoDoes this mean free accounts cannot have private repositories?
- richardwhiuk 8y agoThey can have private repos - it's just branch protection rules which are no go.
- sigi45 8y agoWhat? What is he doing that it makes him fear code loss?
- d2p 8y agoIt's fairly common to do `git push --force` (or hopefully `--force-with-lease`) after operations like rebasing. This overwrites the remote history, so can easily lose work. Many people set some branches as protected, so they can't be force-pushed over accidentally.
- sigi45 8y agoIts not and it shouldn't. I do often rebase on my local branch but i will communicate a force push on master to the whole team and will disable protection temporarily. If thats the only reason, he should overthink his workflow.
- swish_bob 8y agoPeople aren't talking about force pushing to master, they're talking about force pushing to another branch, but with master unprotected, and therefore, by accident, force pushing to master as well.
- karlding 8y agoIsn't that situation only possible if config.push is set to matching? As far as I know, it's been set to simple by default since Git 2.0 [0]. [0] https://git-scm.com/docs/git-config#Documentation/git-config.txt-pushdefault https://git-scm.com/docs/git-config#Documentation/git-config...
- d2p 8y ago> Its not It's not common to rebase? > i will communicate a force push on master to the whole team and will disable protection temporarily Isn't that exactly what this point was about? You have branch protection enabled for master because you think it's a good idea to avoid accidental force-pushes. These comments were exactly about not having the ability to protect branches. I'm not really sure what you're arguing for/against.
- d2p 8y agoI 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.
- Ristovski 8y agoThis answers a question I had I guess. I thought with the new free-tier stuff like private repos - GH pages would still work :(
- woodrowbarlow 8y agoit does but only for public repos.
- leethargo 8y agoI 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?
- pstadler 8y agoHosting 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.
- steve_taylor 8y agoIt’s free on gitlab.com and you can have as many as you want. I recently parked about 10 domains there.
- eugeniub 8y agoI 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.
- moviuro 8y agoFWIW, Branch protection looks like it's a free feature on Gitlab [0] [0] https://docs.gitlab.com/ee/user/project/protected_branches.html https://docs.gitlab.com/ee/user/project/protected_branches.h...
- dsumenkovic 8y agoThat's right, it's available in both free (SaaS) and core( self hosted) tiers.
- reledi 8y agoThere 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.
- SeriousM 8y agoGitlab has private repos for free and the service is imho on par with github
- giancarlostoro 8y agoAs does BitBucket which I prefer just because it matches what I use at work. I also keep a GitLab for backup type reasons.
- ketzu 8y agoAlso Bitbucket supports mercurial repositories, which is a shame has so little support on the other big platforms.
- paol 8y agoGit won though. I'm not especially a fan of git, but at this point advocating for mercurial is tilting at windmills.
- ketzu 8y agoGit 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 8y agoI 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.
- thrownaway954 8y agohonestly though... how many everyday devs actually use something like this?
- giancarlostoro 8y agoIf 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 8y ago> 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 8y ago> It keeps all developers from pushing code without peer review. This is true, I don't know why I went with juniors.
- marmaduke 8y agoBecause junior is a state of mind not an age
- KallDrexx 8y agoYeah but the concept of this post revolves around individual developer github account (not an organizational one). What circumstances would you be protecting your own private repo?
- dustinmoris 8y agoDid 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.
- ausbah 8y agoits never been "obvious" in any point in history
- Shish2k 8y ago> 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 8y agoNo, 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 8y ago> 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.
- amelius 8y agoI think it's stupid that GitHub stores (meta-) data in a place that's not governed by git. Everything should be in git.
- copperx 8y agoAre you suggesting that GitHub should fork git to add new features?
- theamk 8y agoNo of course. Have you seen how github wikis work? Their backend is anoth git repo, with markdown files. Very nice for backups and change detection. Same method can be appplied to configuration. Separate repo with json files or something.
- ebg13 8y agoNot 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.
- kevin_b_er 8y agoGoogle's Gerrit Code Review stores its special permissions and such in a meta/ references namespace, which has restricted permissions. So instead of refs/heads/ for branch names, there's refs/meta/*. The meta space has config files specifying the permissions. Also the config and permissions changes are logged, because they're git commits too. The same could be done without forking git. One could also just have a parallel git repo with config files.
- aequitas 8y agoTo 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_protection.html https://www.terraform.io/docs/providers/github/r/branch_prot... https://www.terraform.io/docs/providers/type/vcs-index.html https://www.terraform.io/docs/providers/type/vcs-index.html
- eugeniub 8y agoI'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.
- jayeshsalvi 8y agoThere 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.
- sli 8y agoIf 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 8y agoI 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?
- deleted 8y ago[deleted]
- kevin_b_er 8y agoIt was a student account. It was not "paid up to" because it was a student account.
- zrobotics 8y agoSo if I don't pay the cable bill and my internet gets shut off, can I reasonably say I am being extorted by the cable company? That's a little hyperbolic. Plus, this isn't even how GH operates anymore, since they now offer free private repos.
- natfriedman 8y agoJared 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=21 https://twitter.com/natfriedman/status/1109880047207235589?s...
- theshadowmonkey 8y agoUsing 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.