This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script is designed to add a target remote to your Git repository and then | |
# force-push all branches and tags to this target. It's particularly useful for | |
# mirroring or backing up repositories. The script prompts for the target's username, | |
# personal access token, and repository URL. Be cautious with force-pushing as it | |
# can overwrite changes in the target repository. | |
# Bash script to add a remote and force-push all branches and tags |