Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

soobinrho/bash-git-pull-in-every-folder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Overview

I use two laptops. I mostly write codes on my big laptop. This meant that whenever I went back to my other laptop, there were many changes in my git repositories, so what I had to do before I wrote this script was to go into every git folder and then git pull in every single folder. This script automates this.

Example

Suppose you have a folder at your home directory: ~/git storeing all your git repositories:

home
└── soobinrho
    └── git
        └── college-programming
        └── dotfiles-personal
        └── powershell-graphs-without-internet-access        

Open your console and type:

PullGitAll

This will automatically git pull in every folder on your ~/git directory.

PullGitAll

Installation

FYI, it works the same without installation as well. You can just copy and paste everything on PullGitAll file onto your console, and it will work the same. However, if you want, you could install it:

# Downloading the script.
sudo dnf install git -y
cd ~/git
git clone https://github.com/soobinrho/bash-git-pull-in-every-folder.git
chmod +x bash-git-pull-in-every-folder/PullGitAll

# Running `PullGitAll`
cd ~/git
./bash-git-pull-in-every-folder/PullGitAll

# (Optional) Adding the script to the `~/.bashrc`
cat >> ~/.bashrc
alias PullGitAll=~/git/bash-git-pull-in-every-folder/PullGitAll

# Adding the script to the `~/.bashrc` allows you to
# run `PullGitAll` without going to its directory first like this:
PullGitAll



About

A script executing git pull on every folder.

Topics

Resources

License

Stars

Watchers

Forks

Languages