Live data from Hacker News

Show HN: git-peek – git repo to local editor instantly

github.com

11–20 of 39 posts

Re: Show HN: git-peek – git repo to local editor instantly

#13

Nice idea but I have an issue. I'm on the new MBP with the M1 and I have code-insiders installed as it runs natively. So I tried the following: git peek https://github.com/ylukem/pin-go -e code-insiders It works, it downloads the repo, opens the editor but it immediately deletes it! Any idea how to fix this?

Turns out this was a bug – it wasn't properly adding `--wait` when opening the editor. Its fixed in 1.1.15.

Re: Show HN: git-peek – git repo to local editor instantly

#15
I like that this doesn't assume what editor and git remote someone uses unlike github1s which is further pushing the development community toward centralizing on Github+VScode. Diversity is good.

You inspired me to write my own. Here is a 9-line shell script version of git-peak: https://git.sr.ht/~alexdavid/dotfiles/tree/master/bin/git-pe...

It doesn't do any fancy tarball magic for Github links, but the shallow clone works fast enough for me - sub 3s on modestly sized repos (especially on non-github repos since github is fairly slow to clone/push/pull).

Re: Show HN: git-peek – git repo to local editor instantly

#16
post #9

I read lots of code on GitHub, so I got really excited when I saw github1s ( https://news.ycombinator.com/item?id=26083919 ), but was disappointed when I saw that search doesn’t work ( https://news.ycombinator.com/item?id=26085540 ). So I hacked together `git peek` on Tuesday night. It works with any git repository, but uses GitHub’s API to be faster when it can.

Does it work with private repos?

I tried github1s with a private repo and it threw an authorization error.

Re: Show HN: git-peek – git repo to local editor instantly

#17
post #15

I like that this doesn't assume what editor and git remote someone uses unlike github1s which is further pushing the development community toward centralizing on Github+VScode. Diversity is good. You inspired me to write my own. Here is a 9-line shell script version of git-peak: https://git.sr.ht/~alexdavid/dotfiles/tree/master/bin/git-pe... It doesn't do any fancy tarball magic for Github links, but the shallow clon…

I think it’s a big stretch to say that providing tools which interoperate with product A and not product B is pushing anyone toward anything. By that logic everything is coercive. This is like when I was informed that I was ruining free computing by personally preferring a less free desktop OS for my own usage and encouraging others to choose what they prefer.

I’m glad you made something that works for more environments. But be careful, you may be accused of pushing more people to use git over mercurial.

Re: Show HN: git-peek – git repo to local editor instantly

#18
post #15

I like that this doesn't assume what editor and git remote someone uses unlike github1s which is further pushing the development community toward centralizing on Github+VScode. Diversity is good. You inspired me to write my own. Here is a 9-line shell script version of git-peak: https://git.sr.ht/~alexdavid/dotfiles/tree/master/bin/git-pe... It doesn't do any fancy tarball magic for Github links, but the shallow clon…

I think it’s a big stretch to say that providing tools which interoperate with product A and not product B is pushing anyone toward anything. By that logic everything is coercive. This is like when I was informed that I was ruining free computing by personally preferring a less free desktop OS for my own usage and encouraging others to choose what they prefer. I’m glad you made something that works for more environme…

Good points. For the record I wasn't trying to say that github1s is "ruining free computing", I was trying to convey the opposite. More diversity is good.

If this had been published first, and github1s came along afterward to make it easier for users who don't set $EDITOR I'd be just as happy that it makes development more inclusive for all, not matter what the tools one prefers.

I'd love to see a mercurial version as well :)

Re: Show HN: git-peek – git repo to local editor instantly

#19
post #18

Earlier quoted context omitted.

I think it’s a big stretch to say that providing tools which interoperate with product A and not product B is pushing anyone toward anything. By that logic everything is coercive. This is like when I was informed that I was ruining free computing by personally preferring a less free desktop OS for my own usage and encouraging others to choose what they prefer. I’m glad you made something that works for more environme…

Good points. For the record I wasn't trying to say that github1s is "ruining free computing", I was trying to convey the opposite. More diversity is good. If this had been published first, and github1s came along afterward to make it easier for users who don't set $EDITOR I'd be just as happy that it makes development more inclusive for all, not matter what the tools one prefers. I'd love to see a mercurial version a…

Good points as well and I’m sorry if I was overly defensive. I agree totally that diversity is a good thing. I mistook some of your wording. But it’s clear you’re sincere about inclusion and I’m glad we had the opportunity to expand the conversation a bit! Thank you.

Re: Show HN: git-peek – git repo to local editor instantly

#20
post #9

I read lots of code on GitHub, so I got really excited when I saw github1s ( https://news.ycombinator.com/item?id=26083919 ), but was disappointed when I saw that search doesn’t work ( https://news.ycombinator.com/item?id=26085540 ). So I hacked together `git peek` on Tuesday night. It works with any git repository, but uses GitHub’s API to be faster when it can.

Does it work with private repos? I tried github1s with a private repo and it threw an authorization error.

Now it does. If you have the `GITHUB_TOKEN` environment variable set to a personal access token or if you happen to use the hubs github cli it will work
Post reply on HN