Skip to content

nidhey27/git-bulk-push-shell-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How to Add, Commit and Push All the Project in PWD to remote GITHUB Repositories

Example:

I have a Projects dir where I have all my projects, and remote git repository is linked to every project. I don't want to navigate to each project dir to push it to remote repository so in this scenario, you can use this shell/bash script to push all the projects to their respective remote repositories at once.

Folder PATH listing
Volume serial number is C80A-3BD9
C:./Projects
├───Project_1
├───Project_2
├───Project_3
└───Project_4

Prerequisite Configuration

You need to configue your git befor using

//add username
git config --global user.name "your_username"

//add email
git config --global user.email "[email protected]"

//check configuration
git config --global --list

Steps to Execute the Script

  1. Go the the Projects DIR where you have all your projects
  2. Clone the SHELL script using
git clone https://github.com/nidhey27/git-bulk-push-shell-script.git
  1. Copy the push_to_git.sh file to the Root DIR of the Projects where you have all other projects Example:
C:.
│   push_to_git.sh
│
├───Project_1
├───Project_2
├───Project_3
└───Project_4
  1. Now you have your shell script in the root DIR, using the following command to run the script
$ . push_to_git.sh
  1. If the DIR does not have git initilized, then it will ask Do You want to add remote repo? (y/n)
  2. If you choose Y then you will be asked for URL - Enter the remote repo URL alt text
  3. After adding the URL, you are read to go.. alt text

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages