We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 201a777 commit cfcd1a1Copy full SHA for cfcd1a1
git-push.bat
@@ -0,0 +1,11 @@
1
+@echo off
2
+for /f %%i in ('git rev-parse --abbrev-ref HEAD') do set current_branch=%%i
3
+for /f %%i in ('git rev-list origin/%current_branch%..HEAD ^| find /c /v ""') do set pending_commits=%%i
4
+if %pending_commits% gtr 0 (
5
+ echo There are %pending_commits% commits pending to be pushed in branch %current_branch%.
6
+ git push origin %current_branch%
7
+ echo Push completed for branch %current_branch%.
8
+) else (
9
+ echo No commits pending to be pushed in branch %current_branch%.
10
+)
11
+pause
0 commit comments