If I fork open-source repository A on GitHub and rename it to B via the Settings tab
Alternative, since Apr. 2022:
Previously, when you forked a repository the fork name would default to the same name as the parent repository.
In some cases, that wasn't ideal because you wanted the fork to have a different name.
Your only option was to rename the fork after it was created. Now you can customize the fork name at the same time you're creating it.
![New fork page -- https://i0.wp.com/user-images.githubusercontent.com/90000203/162800388-9c07b590-75c4-4a86-8042-6eddea94bb61.png?ssl=1]()
Read more about working with forks.
So... no need to rename it after fork.
The fork can directly be created with the right target name.