Skip to content

Instantly share code, notes, and snippets.

@amelandri
Created October 30, 2019 09:20
Show Gist options
  • Save amelandri/746ee624b1102c93cd2bd8992b7f4613 to your computer and use it in GitHub Desktop.
Save amelandri/746ee624b1102c93cd2bd8992b7f4613 to your computer and use it in GitHub Desktop.
Notable auto sync
@echo off
for /f "tokens=1-4 delims=/ " %%i in ("%date%") do (
set day=%%i
set month=%%j
set year=%%k
)
for /f "tokens=1-4 delims=: " %%i in ("%time%") do (
set hour=%%i
set minute=%%j
)
cd C:\path\to\notebook\folder\
git pull && git add --all && git commit -m "Auto update %year%-%month%-%day% %hour%:%minute%" && git push origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment