Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Current js-git capabilities for use in open source project #107

Open
timaeudg opened this issue Sep 22, 2014 · 8 comments
Open

Current js-git capabilities for use in open source project #107

timaeudg opened this issue Sep 22, 2014 · 8 comments

Comments

@timaeudg
Copy link

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

@creationix
Copy link
Owner

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
Copy link

@creationix Could you please share the status of push implementation? As I see at least Github API v3 supports CORS.

@creationix
Copy link
Owner

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
Copy link

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
Copy link
Owner

@nickj12497 please see #122 for a discussion on capabilities and examples.

@nickj12497
Copy link

Thank you for responding so soon and thank you for your help.

@1000i100
Copy link

1000i100 commented May 8, 2020

is there diff merge, rebase tools as of 2020 ?

@creationix
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants