1 Star 0 Fork 0

李静/git_commit_streak

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

git_commit_streak

A tool that shows how many days there are uninterrupted commits

This is a second tool made from a starter project created by mason using macosui_tool_starter.

It scans all git repositories below the selected directory and reads the git log to collect all commits done in last 240 days. From this data a "heatmap" and the commit streak is created. The heatmap is a color coded calendar. The darker the green color the more changes were committed on that day. The streak is the number of consecutive days with at least one commit per day.

Getting Started

Create your own version if you have Flutter installed on macOS anyway.

git clone github.com/schilken/git_commit_streak
flutter pub get
flutter build macos

You find the built app here: git_commit_streak/build/macos/Build/Products/Release/GitCommitStreak

In the settings, you can activate reminders at a specified time, as notifications, and as iMessage. For example, I get a notification and an iMessage at 19h if I have not yet committed anything.

On a MacBook:

On the iPhone:

On a Apple Watch:

Download a release from GitHub

Currrently there is only a release build for [macOS] (https://github.com/schilken/git_commit_streak/releases/)

Disable the standby mode

The cron package can only schedule the commit checks at the specified time, when the Mac is not powered off and the app is running in der background.

By default, a new Mac is–at least in Europe–configured to power down after some delay being in sleep mode (standy 1). I use this app to remind me at 19:00, when I haven't committed anything yet. And that shall work also when the MacBook is closed. With the pmset -c command, I switch off the auto-power-off only when the Mac is connected to the power grid. Use man pmsetto look up other options, for example -a.

$ sudo pmset -c standby 0
<enter root password>

$ pmset -g
System-wide power settings:
Currently in use:
 standby              0
...

Making of this app or similar tools

I generated a starter project using mason. If you want to create a similar tool you can generate a starter project like so:

Credits

Several ideas are taken from https://github.com/bizz84/complete-flutter-course, a great source for learning advanced Flutter created by Andrea Bizzotto (bizz84). Also, thanks to Reuben Turner (GroovinChip) for his great package at https://github.com/GroovinChip/macos_ui

MIT License Copyright (c) 2023 Alfred Schilken Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

学习使用git_commit_streak 展开 收起
README
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/coder-lijing/git_commit_streak.git
git@gitee.com:coder-lijing/git_commit_streak.git
coder-lijing
git_commit_streak
git_commit_streak
main

搜索帮助