Batch modify git warehouse address

Original link: https://blog.frytea.com/archives/788/

75

⚠ The following command will modify the remote address of your code warehouse, please make sure to clearly understand the meaning of the command and perform the operation.
If you are not sure, please make a data backup in advance! ! !

 find ./ -type f -name "config" -exec perl -i -pe 's/192\.168\.66\.43/10.168.68.43/g' {} \;

The above command recursively replaces 192.168.66.43 in all git configuration files ( .git/config ) in the current ( ./ ) directory with 10.168.68.43

This article is transferred from: https://blog.frytea.com/archives/788/
This site is only for collection, and the copyright belongs to the original author.