Hacker News new | ask | show | jobs
by ssmoot 3733 days ago
Github isn't exactly a utopia of UX.

Yesterday I was looking for a way to refresh an old fork with upstream. I'm pretty sure there was a button for this at one point. I looked. Couldn't find it. So instead I had to:

  $ cd ~/src
  $ mkdir github
  $ cd github
  $ git clone myfork
  $ cd myfork
  $ git remote add up upstream
  $ git pull up master
  $ git push origin master
Or something like that. I think I got lost somewhere along the way trying to checkout the upstream branch (is it "up/master" or "up master"? It depends) but it took 5-ish minutes.

Github may be pretty-ish, but I tend to avoid them these days. They're expensive, and they remove useful features. Fool me once, shame on you, fool me twice can't get fooled again.

4 comments

It'd be nice if there were a way to automatically update a fork, including the issue tracker, wiki, releases, etc. The best I've come up with is a set of scripts that iterate over all branches of all forks, running `git checkout $branch; git merge --ff-only upstream/$branch; git push`:

https://gist.github.com/xenophonf/9df09e47a8629bb789ffbb94c7...

I suspect that I'm probably doing forks on GitHub wrong, or at least I'm trying to use them in ways not envisioned by GitHub. In some cases I want to maintain copies of a GitHub repository for archival purposes (e.g., I'm afraid that the developer or GitHub will revoke public access to the repo), while in other cases, I want to institute a kind of code review process prior to merging upstream commits (e.g., I'm afraid of upstream doing something malicious). I will occasionally create branches in my forks, fix something, and send pull requests upstream, but I never feel like I need to maintain those forks---I'll happily delete branches or delete and re-create forks as needed.

You can create a PR from the upstream to your repo, then accept that PR. (I know, that's not immediately intuitive, but at least you can do it without pulling a local copy.)
I tried that once but ended up with a merge-commit with my name on it in the history of my "fork". Is it possible to not end up with such merge-commits?
I don't think so -- you'll need to do something like a git rebase, and there's no way to do that via the GitHub UI.

I know many don't like the 'dirty' history, but I like knowing exactly how the updates made it into my repo.

nice reference to President Bush there at the end :) but I do agree, merging locally(when there are a ton of diffs/merge conflicts that I had to sift through) is still a cumbersome process.
That's really great point, and something I'd love GitHub to put some more time into.

But it's not the argument made by the author :-/