Skip to content

A simple application written in VB.Net to update all your Git repos at once, or one repeatedly until it works

License

Notifications You must be signed in to change notification settings

Walkman100/GitUpdater

Repository files navigation

GitUpdater Build status

A simple application written in VB.Net to update all your repos with one click, or one repeatedly until it works.

Gitter

Compile requirements

See CompileInstructions.md

Download

Get the latest version here, and the latest build from commit here (note that these builds are built for the Debug config and so are not optimised)

Command Line

The syntax to launch GitUpdater from the command line is:

gitupdater.exe [hideGUI] [exitWhenDone] [-gitcmd=<push|pull|(any git command)>] [-gitwhat=<all|selected|notselected|cmdselected|cmdnotselected>] [-dir=<repos parent folder>] [-repo=<repo name>] [run]

some examples are:

gitupdater.exe -gitcmd=push -gitwhat=cmdselected -repo=GitUpdater run exitWhenDone
gitupdater.exe -gitcmd=pull -gitwhat=cmdnotselected -repo=YTVL run
gitupdater.exe hideGUI -gitcmd=pull -gitwhat=all run exitWhenDone

Notes:

  • If you use either of the selected or notselected options, it will say that no item has been specified, since those methods use the selection in the GUI. Please use the cmdselected and cmdnotselected methods.
  • The way this has been programmed allows you to put multiple commands after each other:
gitupdater.exe -gitcmd=push -gitwhat=cmdselected -repo=GitUpdater run -gitcmd=pull -gitwhat=cmdselected -repo=YTVL run
  • Any git command can be used in place of push|pull, the flags can be put in any order (but it is recommended to use the specified order), and anything that doesn't begin with one of the predefined flags will be ignored. This allows for a command like this:
gitupdater.exe -repo=GitUpdater -gitcmd=show ouiocuiygcrdackdacrdi -gitwhat=cmdselected run

This will execute the git show command in the GitUpdater repo.

  • The exitWhenDone flag is only used when the program performs a git operation, so if you use for example gitupdater.exe exitWhenDone it will still open the GUI, but after any Git operation it will close.

Please note that the run flag is necessary to run the program, and if it is put before any other parameters they will not be used (except the exitWhenDone and hideGUI flags, they can be put anywhere).

  • You can launch GitUpdater in a specific repo parent folder:
gitupdater.exe -dir="C:\Users\Matthew\GitHub"

If your repos are located in that folder.

Perform Git commands at a scheduled time

To do this you use an external program to launch GitUpdater with command line args (please see above for an explanation of them).

An external program that you can use is Windows itself, using the Windows Task Scheduler:

1: Press ⊞ Win & R

Run Dialog

2: Type taskschd.msc or copy and paste, then press enter

3: In the window that opens, in the pane on the left click on 'Task Scheduler Library' or expand it and click on the folder where you want to make the task.

Left Pane

4: Click on the option in the pane on the right that reads 'Create Task...'

Right Pane

5: Give the task any name you want. Click on the tab 'Triggers', then the 'New...' button.

Set a name

Click Triggers then New

6: Set when you want the task to start.

Set when you want the task to start

7: Click 'OK', then go to the 'Actions' tab and click 'New...'

Click Actions then New

8: Click 'Browse...' and locate the GitUpdater executable.

Locate GitUpdater

9: In the 'Add arguments (optional):' box add the arguments you want, e.g.

-gitcmd=pull -gitwhat=all run exitWhenDone
-gitcmd=push -gitwhat=cmdselected -repo=GitUpdater run exitWhenDone

Set the Arguments

10: Click 'OK', 'OK' again, then close the Task Scheduler window.

Check the line looks correct

Donate

Show your support!