Move folder in all git branches

We have a central repo with 20 branches, they all use layout like:

/.gitignore
/file1.txt
/file2.txt

Now this should be changed to

/.gitignore
/ProjectFolder/file1.txt
/ProjectFolder/file2.txt

in all branches. How would you approach that in git? Do the change in all branches? Merge everything to master and rename only there? Is there some magical command to batch rename in all branches?

Answers


Use scripting provided by your system and apply the commands to all branches in a for cycle.

Something like this in bash:

for i in $branches; do
   git checkout $i
   ....
   git commit -m "moved files"
done

Need Your Help

Weird output in PHP when reading hex data in serial

php linux arduino kernel

I'm having this weird output when I read hex characters in PHP, wherein PHP fetches its data from Arduino serial..

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.