Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsol committed Nov 6, 2024
1 parent 6cd25e3 commit f390701
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 9 deletions.
66 changes: 66 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,70 @@
<div align="center">
<h1>GitQuill</h1>
<img alt="Logo" src="img/logo.jpg" width="200" />
<h2>Cross-platform GUI for Git.</h2>
</div>

| ![](img/screenshots/commit-history.png) | ![](img/screenshots/file-diff.png) |
|-----------------------------------------|------------------------------------|


Unique features
---------------

* Edit files directly in the diff view.
* Quickly amend past commits with the rebase tool.
* Configure linking from commit messages to your issue tracker.
* Configure buttons to execute any Git command with a click.


Requirements
------------

* [Git](https://git-scm.com/) 2.23+
* [Node.js](https://nodejs.org/) 18+


Installation
-----------

```sh
npm install
npm run build
npm start
```


Notes
-----

* GitQuill has a custom mechanism for saving/restoring work-in-progress (WIP) using branches instead of traditional stashing; this is because Git's stashing has technical quirks that make it difficult to integrate consistently into the UI.
* If you start a rebase while having a file selected, GitQuill will revert the whole commit content in the index, while keeping it in the working tree, so that you can edit files without leaving the application.
* When a conflict is detected, GitQuill automatically resets the unmerged files, in order to avoid the special repository state that makes things complicated to handle. Conflict markers are still left to be manually resolved.
* GitQuill doesn't watch repository files for changes. Status is refreshed when application receives focus or when you perform a relevant action in the UI.
* GitQuill calls `git` commands directly. You can view all executed operations in the log files for each repository: `.git/.quill/app.log`.


Configuration
-------------

* Per-repository configuration file: `.git/.quill/config.json5`. Example:

```js
{
autolinks: [
['#(\\d+)', 'https://github.com/adamsol/GitQuill/issues/$1'],
],
custom_actions: [
{ icon: 'mdi-download-outline', label: 'Pull', command: ['pull'] },
{ icon: 'mdi-upload-outline', label: 'Push', command: ['push'], click_twice: true },
],
}
```

* Global, automatic configuration file (open repositories, UI layout, etc): `%AppData%/GitQuill/config.json` for Windows; see https://electronjs.org/docs/api/app#appgetpathname for other platforms.


Contributing
------------

Thank you for your interest in the project! I generally do not accept pull requests. The best way to contribute is to report a bug or suggest a feature via [Issues](https://github.com/adamsol/GitQuill/issues).
Binary file added img/screenshots/commit-history.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/screenshots/file-diff.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 12 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,23 @@ const app_menu_template = [
{
label: 'View',
submenu: [
{ role: 'reload' }, { role: 'toggledevtools' },
{ role: 'reload' },
{ role: 'toggledevtools' },
{ type: 'separator' },
{ role: 'resetzoom' }, { role: 'zoomin' }, { role: 'zoomout' },
{ role: 'resetzoom' },
{ role: 'zoomin' },
{ role: 'zoomout' },
{ type: 'separator' },
{ role: 'togglefullscreen' },
],
},
{
label: 'Help',
submenu: [
{ label: `Version: ${app.getVersion()}`, enabled: false },
{ label: 'Homepage', click: () => shell.openExternal('https://github.com/adamsol/GitQuill') },
],
},
];
Menu.setApplicationMenu(Menu.buildFromTemplate(app_menu_template));

Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
"name": "git-quill",
"productName": "GitQuill",
"version": "0.1.0",
"description": "GUI for Git.",
"description": "Cross-platform GUI for Git.",
"keywords": [
"git",
"diff",
"gui"
"graph",
"gui",
"client"
],
"repository": "https://github.com/adamsol/GitQuill",
"license": "MIT",
Expand Down
5 changes: 0 additions & 5 deletions src/utils/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ export async function getStatus(repo, ...args) {
file.x === file.y && ['A', 'D'].includes(file.x),
]));
if (conflict_files.length > 0) {
// The special state of unresolved conflicts makes things complicated to handle,
// and annoying from the user perspective, as many standard Git commands refuse to work as expected.
// For this reason, we automatically reset the files.
// This still leaves the conflict markers to be manually resolved,
// but brings the repository back to a normal state.
await repo.callGit('reset', '--', ..._.map(conflict_files, 'path'));
// Additionally handle the "deleted by them" conflict, so that it doesn't go unnoticed.
for (const file of _.filter(conflict_files, { x: 'U', y: 'D' })) {
Expand Down

0 comments on commit f390701

Please sign in to comment.