Productivity Tools

Tools written by an IT business manager, a passionate developer.

Manage Git repositories

Module allows to manage multiple repositories at the same time. I am using it as a backup tool.

Every day I am scanning my repositories and check if any of it has some uncommited changes. If yes, changes are pushed. If changes weren’t staged, new AutoCommitBranch branch is created and data is pushed there.

Module also allow me to update all repositories from given directory.

Check out detailed description of the commands below.

Pull-GitRepository

Performs git pull for given directory. Following command will

Pull-GitRepository D:\GitHub\ProductivityTools.ConnectionString\
PullGitRepository

Pull-GitRepositories

Iterates through list of directories under directory provided and invokes git pull for each repository.

Pull-GitRepositories D:\GitHub\
Pull-GitRepositories

Push-GitRepository

It pushes changes to the Git repository. If current branch is ahead of remote, it will push it, if changes are not commited it will create AutoCommit branch and push all changes to it.

Push-GitRepository
Push-GitRepository -Directory D:\GitHub\ProductivityTools.ConnectionString\
Push-GitRepository

Push-GitRepositories

It iterates through given directory and for each directory inside it will invoke Push-GitRepository cmdlet.

Push-GitRepositories D:\GitHub\

It will open GitHub directory and foreach directory inside it will invoke Push-GitRepository

Push-GitRepositories

Get-AutoCommitRepository

Checks if git repository contains AutoCommitBranch branch.

Get-AutoCommitRepository D:\GitHub\ProductivityTools.Meetings\
Get-AutoCommitRepository

Get-AutoCommitRepositories

Iterates through all git repositories inside provided directory and invokes Get-AutoCommitRepository for each.

Get-AutoCommitRepositories -Directory D:\GitHub\
Get-AutoCommitRepositories

Get-GitRepositoryStatus

Checks if given repository has something to be commited.

Get-GitRepositoryStatus D:\GitHub\ProductivityTools.ConnectionString\
Get-GitRepositoryStatus

Get-GitRepositoriesStatus

Iterates through all git repositories inside provided directory and invokes Get-GitRepositoryStatus for each.

Get-GitRepositoriesStatus -Directory D:\GitHub\
Get-GitRepositoriesStatus