Show HN: git-peek – git repo to local editor instantly
github.com
github.com
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).
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.
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 :)
As the simplest example, take the monopoly of IE6 which was reinforced by web site makers who did not interoperate with other browsers because they expected the majority to use IE.
Edit: lest I forget, I also took great pains to support IE, which also was bad, and the people who didn’t want to support it were also right.
I tried github1s with a private repo and it threw an authorization error.
My latest iteration involves not using the terminal at all - I open the project from emacs instead. So I `M-x peek-repo`, paste the url, and the project will be cloned and open right in my emacs (I use a GUI variant).
Also, personally I don't find the need to use a tmpdir - my tradition is cloning to ~ and just let it remain there indefinitely. I always end up with a mere 100 repos before next time I wipe my computer for whatever reason.
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?
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.
github1s.com - just add "1s" to any github URL and it opens the repo in VS Code in your browser
I ask because I've been looking to improve my Shopify workflow. Buddy.works does the deploy to Shopify. But I'm trying to cut out the push. More or less changes + saves become commits, and then instantly deploy.
If not, perhaps someone can recommend something else?
Isn't this a 2-line shell script?
Got "line 12: -S: command not found".
Are you the author? Else why are you posting it as a Show HN?
When it’s a regular git link, it does a partial clone and opens in your editor.
I apologize. I don't know why I got the idea you weren't the author. It's not like the account names don't imply it.
I was aggressive because only the day before I too saw github1s and found it mostly pointless and this seemed the same.
You have answered both questions though, so, well that's why I phrase challenges as questions, in case my head is up my ass.
All of the above can be easily seen by looking at the provided link for about five seconds.