You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Current js-git capabilities for use in open source project #107
I am part of a team that is looking at making a browser-based application that allows for git-esque functionality for non-technical users (think Microsoft Word level of technical capacity).
As such, we were looking at using js-git with browserify to allow for client-side git commands, and it looks like js-git is the most actively developed library for this.
That being said, I was having difficulty finding the documentation on every feature we care about, so I figured I would ask it here, and note what I knew about it in case I was incorrect.
fetch & clone: From what I have read, this functionality is there in js-git, but I could not find specific documentation on it.
init: The README has stuff about creating a repository in-memory, so I think this correlates to initializing a repo.
commit: this functionality is present for in-memory repos and is noted in the README
diff: I have seen no documentation for this, but presumably since it would be a Read-Only action, it might be finished under Milestone 1?
merge: I haven't seen much on this, in-fact, I think that I saw it was projected to be worked on in a later milestone. This is not super-critical as we have our own plans for this anyway, but having basic diff function is necessary.
branching: I have read nothing about this, so I have no clue what the state of this is
push: I saw that there is a way to "push" via mounting the GitHub repo as a filesystem. That being said, is there any more to pushing the files to a Git server that I'm missing?
Any answers to these would be very helpful to get a good idea of what's there and what isn't, and when stuff will be there.
Thanks
Reacted by stephen, Millicent Billette and evandrocoan
Fetch and clone is mostly done, yes it needs more docs.
Depending on the backend there are different ways to initialize js-git.
commits can easily be created manually using saveAs and updateRef
Diff isn't implemented at all. I haven't started this.
Merge depends on diff so it's also not started
Branching can be done manually by simply creating new refs. A branch in git is literally nothing more than a new bookmark.
push isn't quite done. I've been fighting the restrictions of web pages for years and trying to get the git hosting companies to open up CORS. I want to do push correctly without leaking people's credentials.
Github has always had CORS for their proprietary API, but that's not what git uses to push over https or ssh. You can use the github api via js-github. This is what tedit.creationix.com does when you sync a github mount.
Hey, @creationix. I, like @timaeudg, am working on an app to do a lot of the git commands but without use of the CLI because we want people to be able to install the app and not have to worry about installing git. One of the main things we want the app to do is clone, but I am having a hard time finding the examples or the documentation on how to properly clone using js-git, js-github, and git-node-fs. Any help would be greatly appreciated.
Sorry, no progress. Last I checked, github and the popular hosts still haven't added CORS headers ot the git https endpoints so it's not possible to speak git protocols from a website.
Activity
creationix commentedon Oct 3, 2014
Sorry I didn't see this issue for some reason.
Fetch and clone is mostly done, yes it needs more docs.
Depending on the backend there are different ways to initialize js-git.
commits can easily be created manually using saveAs and updateRef
Diff isn't implemented at all. I haven't started this.
Merge depends on diff so it's also not started
Branching can be done manually by simply creating new refs. A branch in git is literally nothing more than a new bookmark.
push isn't quite done. I've been fighting the restrictions of web pages for years and trying to get the git hosting companies to open up CORS. I want to do push correctly without leaking people's credentials.
mehdisadeghi commentedon May 25, 2015
@creationix Could you please share the status of push implementation? As I see at least Github API v3 supports CORS.
creationix commentedon May 25, 2015
Github has always had CORS for their proprietary API, but that's not what git uses to push over https or ssh. You can use the github api via js-github. This is what tedit.creationix.com does when you sync a github mount.
nickj12497 commentedon Oct 9, 2015
Hey, @creationix. I, like @timaeudg, am working on an app to do a lot of the git commands but without use of the CLI because we want people to be able to install the app and not have to worry about installing git. One of the main things we want the app to do is clone, but I am having a hard time finding the examples or the documentation on how to properly clone using js-git, js-github, and git-node-fs. Any help would be greatly appreciated.
creationix commentedon Oct 12, 2015
@nickj12497 please see #122 for a discussion on capabilities and examples.
nickj12497 commentedon Oct 22, 2015
Thank you for responding so soon and thank you for your help.
1000i100 commentedon May 8, 2020
is there diff merge, rebase tools as of 2020 ?
creationix commentedon May 12, 2020
Sorry, no progress. Last I checked, github and the popular hosts still haven't added CORS headers ot the git https endpoints so it's not possible to speak git protocols from a website.