This file contains hidden or 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
| <# | |
| .SYNOPSIS | |
| Synchronizes GitLab repositories from a source to a target instance. | |
| .DESCRIPTION | |
| This function clones repositories from a source GitLab instance, processes them, and pushes the specified branch to a target GitLab instance, ensuring safe fast-forward only operations. | |
| .PARAMETER SrcDomain | |
| The source GitLab server domain or IP address. |
This file contains hidden or 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
| # 1. Remove everything from the index (but not from disk) | |
| git rm -r --cached . | |
| # 2. Re-add everything (now respecting .gitignore, including staging .gitignore itself) | |
| git add . | |
| # 3. Commit the changes | |
| git commit -m "Apply new .gitignore rules" | |
| # 4. Push to remote |