Live data from Hacker News

Think Twice Before Downgrading to a Free GitHub Account

blog.jaredsinclair.com

11–20 of 102 posts

Re: Think Twice Before Downgrading to a Free GitHub Account

#11
post #9

Earlier quoted context omitted.

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 d…

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.

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.

Re: Think Twice Before Downgrading to a Free GitHub Account

#13
post #11

Earlier quoted context omitted.

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.

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.

You 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".

Re: Think Twice Before Downgrading to a Free GitHub Account

#14
post #4

> 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.

It 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.

Re: Think Twice Before Downgrading to a Free GitHub Account

#15
post #4

> 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.

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.

[deleted]

Re: Think Twice Before Downgrading to a Free GitHub Account

#17
post #11

Earlier quoted context omitted.

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.

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.

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?

Re: Think Twice Before Downgrading to a Free GitHub Account

#18
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.

Re: Think Twice Before Downgrading to a Free GitHub Account

#19
post #16

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

It'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.
Post reply on HN