Вопрос

Maybe I'm lacking some google search skills, but, before I start building one from scratch,

Is there a ready-made web-based git commit tool?

What I need it to do is allow the user, from a web interface, to:

  1. have the list from "git status"
  2. pick the files he wants to commit (maybe also see a diff) - this will do git add on each file
  3. commit with a message
  4. push to remote

This is so I can enable people without command line skills to push their template changes

Thanks

Это было полезно?

Решение

It shouldn't be to complicated to make one.

I just checked it, if you have a recent git version (I think a git 1.7.x will do), here are the commands:

# get list of files changed (porcelain output is machine parsable with status information per file):
git status --porcelain

# get diff of file
git diff $FILE

# add file to index/cache to commit
git add $FILE

# do dry-run before commit
git commit --dry-run --porcelain

# commit file(s) 
git commit --file=/tmp/commit.message
# or commit message from stdin:
git commit --file=-

If someone does make one, please put it up on github so we can all use it.

And don't forget to put a password-system on it to prevent just about anyone changing your code.

UPDATE: I've created a small web-based commit tool:

https://github.com/Lennie/git-webcommit

https://github.com/Lennie/git-webcommit

Другие советы

I haven't tried all of these, but surely one of the GUI or web interfaces in this gigantic list will fit your needs or come close enough for you to customize yourself.

This is an old topic, these days https://github.com/FredrikNoren/ungit also exist.

It seems to be a lot more stable than it used to be. So might be useful for some places where PHP isn't installed.

I'd also suggest Lennie's git-webcommit – here's a screenshot. It is the only free software git web commit tool that I'm aware of.

But for simple needs you may find that GitHub Gist is enough. Every gist is a git repository, and you can add files via the web interface. (On the main GitHub site however, you can edit files via the web interface, but not add new ones that way.)

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top