cloose / CuteMarkEd

Qt Markdown Editor
http://cloose.github.io/CuteMarkEd
Other
1.48k stars 317 forks source link

Interest in git integration? #364

Open igor-krawczuk opened 6 years ago

igor-krawczuk commented 6 years ago

To bring Markdown and git based collaboration(via gitlab) to an NGO I'm working with I've been looking for a Markdown editor with git integration. Since there doesn't seem to be one, I've decided to add it to CuteMarkEd. I've started work in my fork and just finished testing the very basic functionality (init,add, commit) and am now thinking about what workflow to add. Would there be interest in upstreaming this functionality once I'm done?

So far, my idea was to only add a "simple git" flow, which allows for pull/push, as well as a unified "commit changes" (equal to add+commit for the opened file) and "commit all changes" (equal to adding all files in the repo which are not ignored and committing). The basic structure would be:

  1. After a file is saved, search upwards for a git repository. If we find one, ask for commit message and add+commit the changes.
  2. Under a new "Git" tab in the options bar, the options "commit all changes", "push", and "pull" can be found. "commit all changes" will refuse to commit if there are outstanding merge conflicts. Push will automatically pull first and alert if there are merge conflicts.

Clone, init, diff, merge etc. could be done in further releases, but I don't think it is necessary to have the full feature suite if all you are trying to do is e.g. editing a wiki for github or gitlab, or working on a book/text collaboratively. By implementing the "simple git" first and the full suite later (hiding it behind a "full git functionality" toggle in the options) this is quicker to implement and non-technical users would have an easier time using Markdown+git+gitlab/github/etc. (The reason why I think this is worthwhile is that I've found the tools that gitlab and github offer - like issues with labels, kanbans, groups/projects, linking to issues and changes in lines of text - are miles ahead of most knowledge management and project management tools. )