Live data from Hacker News

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

github.com

1–10 of 39 posts

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

#4
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?

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

#5

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?

Author here — this is actually not a bug, but a deliberate design decision (so long as you meant, when the editor closes). I’m sorry for the confusion.

git peek is not a faster alternative to git clone. It’s for quickly reading other people’s code without needing to keep it around for writing or updating.

That being said, I could make it not delete the code after the editor closes and keep it somewhere. It just won’t have access to the git tree and other things you’d expect.

I could add a flag like —keep that doesn’t delete it and let’s you pass a place to put it.

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

#6
post #5

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?

Author here — this is actually not a bug, but a deliberate design decision (so long as you meant, when the editor closes). I’m sorry for the confusion. git peek is not a faster alternative to git clone. It’s for quickly reading other people’s code without needing to keep it around for writing or updating. That being said, I could make it not delete the code after the editor closes and keep it somewhere. It just won’t…

Thanks for jumping in Jarred. My mistake, I wasn't aware of the rule and just wanted to share you project because it was so cool.

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

#7

Does this work with any git repo? Else, shouldn't this be called github-peek? Are you the author? Else why are you posting it as a Show HN?

It works with non GitHub repos, but it’s not as fast. When it detects a GitHub link, it downloads the tarball from GitHub & and separately downloads the specific file linked (or the readme) using JSDelivr as a CDN. This is much faster than a normal clone

When it’s a regular git link, it does a partial clone and opens in your editor.

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

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

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

#10

Does this work with any git repo? Else, shouldn't this be called github-peek? Are you the author? Else why are you posting it as a Show HN?

Why so aggressive?

All of the above can be easily seen by looking at the provided link for about five seconds.

Post reply on HN