DEV Community

Cover image for Run TortoiseGit from the command line or phpstorm
Julian
Julian

Posted on

1

Run TortoiseGit from the command line or phpstorm

put a file called tgit.bat in a bin folder which is in your path with the following content:

@ECHO OFF
rem https://tortoisegit.org/docs/tortoisegit/tgit-automation.html
rem gitk 
rem https://ayende.com/blog/4749/executing-tortoisegit-from-the-command-line
rem https://stackoverflow.com/questions/4562210/how-to-open-the-tortoisegit-log-window-from-command-line
rem https://stackoverflow.com/questions/357315/get-list-of-passed-arguments-in-windows-batch-script-bat/382312

IF NOT "%~1"=="" GOTO PARAM_COMMAND

:DEFAULT_COMMAND
rem if no command is passed via parameter, fallback to "commit" as default command
TortoiseGitProc.exe /command:commit /closeonend:0
GOTO EXIT

:PARAM_COMMAND
rem as having command passed via parameter, use this as command
TortoiseGitProc.exe /command:%~1 /closeonend:0

:EXIT
Enter fullscreen mode Exit fullscreen mode

tgit will start the commit gui of tortoise git (same as running tgit commit)

tgit log will show to history screen

list of all commands can be found here: https://tortoisegit.org/docs/tortoisegit/tgit-automation.html#tgit-automation-basics

links:

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (1)

Collapse
 
hannesdorn profile image
hannesdorn

You can remove :EXIT and just use GOTO :eof to jump to the end of file.

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more