Categories
Linux

Git terminal tabs on Ubuntu

UPDATE 2022: This is not working anymore… You can achieve something similar using

gnome-terminal --tab --working-directory=/www/ -- bash -c "git pull;git status; exec bash -i"

Maybe its me but I got used to use terminal to handle my git repos and I like it that way. I have tried many other UI interfaces but none seems as good as the terminal, using Aliases for git made my life lot easier.

The issue I was facing is that if at some point I needed to restart my PC for some short of reason I needed to open another time all the terminal tabs with my git repos (7 that I use daily)…so after learning a bit I created a bash script to open then for me 😉

With this script what I do is open the folders in the array (space separated) in new terminal tabs, then do a git pull to be sure they are sync and then a git status to see where the heck I am.

Create a file in /usr/bin/git.sh for example, so later you can just do from terminal git.sh