A Practical Windows Terminal Setup with Git Bash and Automatic Pane Layout
Source: Dev.to
Overview
When I start my workday, I prefer my development environment to be ready immediately. This guide shows a simple and consistent setup using Windows Terminal and Git Bash, configured to open five panes automatically on startup.
Prerequisites
- Windows Terminal
- Git for Windows (provides Git Bash)
Install the tools
winget install Microsoft.WindowsTerminal
winget install Git.Git
After installing Git, restart Windows Terminal once to avoid potential PATH‑related issues.
Configure Git Bash as a Windows Terminal profile
- Open Windows Terminal.
- Press Ctrl + , to open Settings.
- Select Add a new profile → Empty profile.
- Fill in the fields:
| Setting | Value |
|---|---|
| Name | Git Bash |
| Command line | C:\Program Files\Git\bin\bash.exe --login -i |
- Go to Startup and set Default profile to Git Bash.
- Save the settings.
Now Windows Terminal launches Git Bash by default.
Create a shortcut with a predefined pane layout
The shortcut will:
- Launch Windows Terminal
- Use Git Bash in all panes
- Split the window into five panes
- Start in a specified directory
Replace your-username with your Windows user name.
wt -p "Git Bash" -d "C:\Users\your-username\Desktop" ; \
split-pane -V -p "Git Bash" -d "C:\Users\your-username\Desktop" ; \
move-focus Left ; \
split-pane -H -p "Git Bash" -d "C:\Users\your-username\Desktop" ; \
move-focus Right ; \
split-pane -H -p "Git Bash" -d "C:\Users\your-username\Desktop" ; \
split-pane -H -p "Git Bash" -d "C:\Users\your-username\Desktop"
- Create a new desktop shortcut.
- Set the shortcut’s target to the command above (you can place it in a
.batfile and point the shortcut to that file). - Name the shortcut something simple, such as Dev Terminal.
Add the shortcut to the Windows startup folder
- Press Win + R.
- Type
shell:startupand press Enter. - Paste the shortcut into the opened folder.
With this configuration, the terminal opens automatically with the desired pane layout each time Windows starts.