13 ms·
Bit – A modernized Git CLI written in Go
- chriswalz 6y agoGit is an awesome tool – so awesome that it has a vast plethora of options and commands to do just about anything. Bit attempts to alleviate some of that pain.
- offtop5 6y agoThanks for making such a cool tool. Does it intergrate anything like gitflow ?
- chriswalz 6y agoThanks! Right now it has no special configuration or setup as I want it to be as easy to install as possible (simply run a curl command or go command). Perhaps down the road it will – totally depends on what direction bit will go based on feedback from users :)
- rhabarba 6y agoAnd all of those commands have an incompatible syntax. SVN is much better in these regards.
- tpetry 6y agoYes! A git cli with a good syntax which is the same for every command would be useful. It would not have to do every nifty git feature, just uses a senseful subset: git push/bull branching/merging/rebasing and add some nifty common problems like delete file from history, remove last x commits already pushed etc. The most popular git questions on stackoverflow tells a story on which tasks are more complex on git because you have to know all the internal tricks.
- wazanator 6y agoI just personally use BFG to scrub files from history https://rtyley.github.io/bfg-repo-cleaner/ https://rtyley.github.io/bfg-repo-cleaner/
- crucialfelix 6y agohttps://github.com/tj/git-extras/blob/master/Commands.md https://github.com/tj/git-extras/blob/master/Commands.md does it pretty well. Everything you've listed is covered there I think.
- tpetry 6y agoThanks, this is really awesome!
- pjmlp 6y ago- rant mode on Having used most SCM since RCS days, I get to differ, but since I am left without another option, so just like with C and JavaScript, I suck it up and get the job done by whatever means. - rant mode off Thanks for bringing a bit more of security into the IT world with a Go version though.
- formerly_proven 6y agoWhy would a different CLI (presumably still using libgit2) improve security? Especially if it's installed like this: curl -sf https://gobinaries.com/chriswalz/bit https://gobinaries.com/chriswalz/bit | sh;
- bamboozled 6y agoMemory safety?
- justincormack 6y agoIt doesn’t use libgit2 it shells out to git. So it doesn’t improve security.
- pjmlp 6y agoIt still does, by adding yet another layer, written in a memory safe language. Just like a castle with a water pit can still be conquered, but it takes a bit more effort for achieving it.
- monadic2 6y agoDepends entirely on threat model. More code is more surface area for vulnerabilities to be found.
- johnisgood 6y agoI do not care about memory safety only, I would be pissed if it removed my files, for example. :D Security is too broad a term anyways, hence this thread.
- s_dev 6y agoGot would have been a better name. It includes Go and sounds like Git.
- Johnnynator 6y agoThere is already a git compatible VCS called got, it is developed from some OpenBSD pople. https://gameoftrees.org/ https://gameoftrees.org/
- xixixao 6y agoNext up for anyone willing to take the bite: Build a unified for CLI for Mercurial and Git. It's a challenge but it's worth it :)
- different_sort 6y agoBit, bite? I see what you did there
- Humphrey 6y agoAtlassian tried to do the GUI version of this with SourceTree. Unfortunately mercurial performance was terrible!
- aayjaychan 6y agoThere is one (though incomplete)! And it's called Mercurial. Since 5.4 released earlier this year, Mercurial is slowly gaining [1] the ability to operate on local Git repositories with its bundled git extension [2]. [1]: https://www.mercurial-scm.org/repo/hg/log?rev=keyword%28%27git%27%29&revcount=40 https://www.mercurial-scm.org/repo/hg/log?rev=keyword%28%27g... [2]: https://www.mercurial-scm.org/wiki/GitExtension https://www.mercurial-scm.org/wiki/GitExtension
- masklinn 6y agoThere’s also even the option of using hg as a git client since forever, though iirc the extension broke somewhat regularly (though I was using it on OS X which may not have helped).
- bransonf 6y agoIt’s not mentioned in the README, but is WSL2 on the Windows Terminal app supported? I could run gnome terminal but then I have to configure X11 and that’s a pain. Thanks, this looks awesome.
- chriswalz 6y agoI'm not sure. I encourage you to try it out. If it ends up not working please file an issue and we'll get it sorted out.
- bransonf 6y agoWill do, I’ll give it a shot sometime this week and report back. Still not sure how much of a niche WSL is, but it’s my daily driver.
- kadoban 6y agoWSL2 is barely esoteric at all, especially because it's hard to find anything that works in your chosen linux distro that doesn't work in it (except GUI has to be set up separately). WSL1 that's a bit more hit-and-miss, anything not quite low-level should be fine though.
- jamesgeck0 6y agoWhile WSL1 had a bunch of compatibility caveats, WSL2 is just a VM. It's generally safe to assume that everything is compatible until evidence surfaces otherwise.
- voltagex_ 6y agoIt should be, there's a Linux and a Windows release at https://github.com/chriswalz/bit/releases https://github.com/chriswalz/bit/releases - you could just run it natively without WSL though?
- grep_name 6y agoIncidentally, I've actually found it much less painful to use urvxt through VcXsrv for WSL than anything else. The config at that point is just identical to my linux boxes but it interacts with windows in normal, sane ways and X11 programs generally run just fine
- brigandish 6y agoThe autocomplete/help popups didn't happen for me, is there something I need to do? I'm using zsh on a Mac, perhaps it assumes bash. Aside from that, I'm going to persist with this for a little while and see how it goes, the git interface does bother me.
- chriswalz 6y agotry typing `bit` and press <enter> or `bit checkout` <enter>
- brigandish 6y agoThat sorted it, thanks. Perhaps a word in the README? The impressive gif makes it seem as if it should just appear.
- paulsmal 6y agotry using bash, maybe zsh autocompletion interfering with it?
- brigandish 6y agoSame outcome, but using enter works. It's possible I've done something to both bash and zsh, I like to tinker :)
- drcongo 6y agoI don't see autocomplete popups either - Fish on iTerm2 here. First thing I did was type `bit` and hit tab and I got a Go traceback - `panic: COMP_POINT env should be integer`
- brigandish 6y agoSounds like one for the issue list! You've probably seen it but chriswalz replied below and <enter> is the right trigger.
- tuananh 6y agoI love the initiative, however the autocomplete popup doesn't work so well. i made a typo and i can't backspace to delete it.
- aloknnikhil 6y ago> https://news.ycombinator.com/item?id=24173238 https://news.ycombinator.com/item?id=24173238 Super cool and thanks for this! I commented a few weeks ago on how it'd be nice to have a git CLI that actually helps you find the command you're looking for because you don't really know what to search for unless you know what command to use with git. It's sort of this chicken-and-egg problem that this seems to help solve.
- stinos 6y agoHonest question: what's up with the (2 hours ago) notation? I've seen this before in a couple of git-related and other applications but personally never understood why one would pick this over date/hour. Is this a cultural thing? Do some people actually find this better (from the point of conveying timestamp information)? My main problem with it, apart from not having a high resolution, is that it usually just leads to me trying to calculate the actual date from it because that just works for me, being used to it. Same with e.g. Thunar: to me it's maddening that it defaults to displaying 'today/sunday/saturday' and then mixes that with plain dates for timestamps older than a week (or so). Can be me, but this is just so confusing and harder to parse?
- atoav 6y agoDepends, for some things (e.g. the timestamp of a blog post) it just doesn't need to be precise. This thing has the advantage that you don't need to know the current time and subtract the timestamp from it to see it is 2h old. For a lot of other stuff it doesn't make any sense at all. E.g. when you have a lot of things all with "2 hours ago" the precision is too low, when you are more interested in the time of day something was happening etc.
- bbbobbb 6y agoIt does depend on the context but I mostly use the '2 hours ago notation'. Sure, if you're looking for a specific timestamp or something that happened 2 months ago, it's not useful and then I switch to the timestamp format. Majority of the time I care about stuff like what happened today, yesterday just to get the rough idea.
- nxpnsv 6y agoIt's timezone independent... I think it makes sense when hour time scales make sense. For days/week dates work just fine
- saurik 6y agoI agree: to me this is like a car giving you driving directions by saying "turn north" instead of "turn left"; there are people who legitimately find either way to be easier, and if you give them the wrong way they are just going to have to convert it... I find absolutely dates and times to be super intuitive, and I have most of my life laid out in my head with absolute dates, and find relative dates and times to be infuriating. This is the kind of thing that should just always be a setting.
- domlebo70 6y agoThe autocomplete popups are really cool. Does anyone know if there's a generic way to provide this for all tools with CLI's with help text? What about being able to parse a Programmable Completion file. I don't know much about this stuff, but the thought popped into my mind.
- mschrage 6y agoThis is something I’ve been working on! Autocomplete popovers / CLUIs seem like a really natural way to enhance discoverability in the terminal. https://github.com/withfig/completion-specs https://github.com/withfig/completion-specs
- remolueoend 6y agoThere are some default completion replacements out there, such as fzf-tab for zsh: https://github.com/Aloxaf/fzf-tab https://github.com/Aloxaf/fzf-tab
- unkulunkulu 6y agoTake a look at fzf, it’s quite generic
- OJFord 6y agoI really liked the look of this, until I got to `save`/`sync` in the readme... That's not how I want to work, and it's not how I want other people to work in a repository I'm using. I know 'I don't have to use them then I can just use the git subcommands', but that's not the point, it's a big signal ('90% of the time the above commands will have you covered.') about the motivation/angle/philosophy of the project that doesn't match my attitude towards git at all. Which is a shame, because the autocomplete stuff looks really nice.
- zaro 6y agoI didn't even get to sync, stopped reading on 'save'.
- YesThatTom2 6y agoThank god you did! I’ve seen too many “make it easier for normal people” projects ruined by trying to appease people that have muscle memory for the old way. Luckily bit doesn’t do anything that would prevent someone from using git on the same repo. You can co-exist. I’ll make this prediction based on decades of observations: 1. There will be many projects like this. 2. Eventually one will win out and the others will fade. 3. The winner will be the one that focused on a particular audience AND successfully ignored so-called experts that didn’t see the need for such a project. 4. After one tool wins out, the nay-sayers start to adopt it. Forums like HN get flooded with posts about how “I wish I had tried it sooner”. But seriously... if you don’t need this kind of tool do the other 98% of the world develop it in peace.
- papey 6y agoSame here
- nemetroid 6y agoThe ability to write alternative CLIs on top of Git is often touted as a feature (as well as a defense against criticism of the existing CLI). I'm not terribly excited by save/sync either. But as long as it doesn't have adverse effects, e.g.: * promotes bad history patterns * makes it easier to miss when unwanted changes are included * makes it easy to accidentally push ...I see it as a good thing to have new UI patterns tried out. If nothing else, it can act as a counterpoint to show that the complexity of the Git CLI actually is necessary for some of the flexibility. EDIT: I see now that "bit save" encourages using single-line commit messages, which to me promotes bad history patterns. That's too bad.
- outadoc 6y agoThis is never going to be popular with French-speaking developers, haha.
- severak_cz 6y agoThis looks like good CLI UI for git, something that git needed from day one.
- chriswalz 6y agoyep
- the_greyd 6y agoCool project! Love the autocomplete feature. Just my 2 cents about the custom commands, hiding the complexity of git commands is not something I'd like personally (not accounting for alias, aliases are cool). In most cases you'd much rather know which exact git command did/does what to debug/fix, so it's better to invest that time learning early on..
- h3rsko 6y agoThere is another alternative called gitgud if you want more of a gui interface. https://github.com/GitGud-org/GitGud https://github.com/GitGud-org/GitGud
- throwaway894345 6y ago> Think in the age of the cloud What does this mean? Especially for a git client?
- nojvek 6y agoThe code completion thing is amazing. How does bit do it? I want to do that for all sorts of cli utilities I write.
- seedie 6y agoThe README mentions go-prompt[0] which is based on python-prompt-toolkit[1] [0] https://github.com/c-bata/go-prompt https://github.com/c-bata/go-prompt [1] https://github.com/prompt-toolkit/python-prompt-toolkit https://github.com/prompt-toolkit/python-prompt-toolkit
- deleted 6y ago[deleted]
- the__alchemist 6y agoI recommend updating the install instructions to point to the binaries in the Release section, and not bundling the Windows ones in tar.gz.
- mixmastamyk 6y agoAnyone have a direct link to the linux x64 binary?
- chriswalz 6y agohttps://github.com/chriswalz/bit/releases/download/v0.6.10/bit_0.6.10_Linux_x86_64.tar.gz https://github.com/chriswalz/bit/releases/download/v0.6.10/b... https://github.com/chriswalz/bit/releases/tag/v0.6.10 https://github.com/chriswalz/bit/releases/tag/v0.6.10