Created
March 8, 2022 11:26
-
-
Save mattcuk/5f897b80e81845f8efdd82920d4cc3e8 to your computer and use it in GitHub Desktop.
AutoHotKey script that alerts you if you have changes you need to push for a particular repository
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #Warn ; Enable warnings to assist with detecting common errors. | |
SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
Loop | |
{ | |
IfNotExist, c:\winapps\scripts\GitHubNotPushed.out | |
RunWait %ComSpec% /c "git log --oneline @{upstream}.. > c:\winapps\scripts\GitHubNotPushed.out", c:\your-repo-path\, Hide | |
IfExist, c:\winapps\scripts\GitHubNotPushed.out | |
GitPushSize := 0 | |
FileGetSize, GitPushSize, c:\winapps\scripts\GitHubNotPushed.out | |
if (GitPushSize > 0) { | |
MsgBox, 48, , You have changes that haven't been pushed for your repo | |
} | |
FileDelete, c:\winapps\scripts\GitHubNotPushed.out | |
Sleep, 60000 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment