Is there a way to add a new file to all of my projects in my Git Repository at once? #21895
-
Hi, I am trying to add a config file to all my projects in my Git repository. I can do it one by one but I had more than 140 projects in my Git repo, which takes a lot of time to get that done, so I was trying to find a shorter way to add this file to all of my projects at once, is it possible? by writing any script? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Do you mean that you have a bunch of subdirectories under https://github.com/deepu558/some-repo-name that you want to add the same file to? Or do you mean that you have a bunch of repositories under https://github.com/deepu558 that you want to add the same file to? |
Beta Was this translation helpful? Give feedback.
-
I mean that I have a bunch of repositories under https://github.com/deepu558 that I want to add the same file to. |
Beta Was this translation helpful? Give feedback.
-
There isn’t a built-in way to do this on GitHub. When I’ve needed to do something like this, I’ve built a script to loop through all the repositories listed in a text file and perform the following with each:
I posted a Ruby script that does a lot of the Git interactions to help get you started. |
Beta Was this translation helpful? Give feedback.
There isn’t a built-in way to do this on GitHub. When I’ve needed to do something like this, I’ve built a script to loop through all the repositories listed in a text file and perform the following with each:
git fetch
I posted a Ruby script that does a lot of the Git interactions to help get you started.