Skip to content

Instantly share code, notes, and snippets.

@stevetalkscode
Created October 9, 2020 15:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevetalkscode/9d1177afb467b21d8ad0780023f24b22 to your computer and use it in GitHub Desktop.
Save stevetalkscode/9d1177afb467b21d8ad0780023f24b22 to your computer and use it in GitHub Desktop.
Snippet of the CreateMonoRepo script that sets the initial varaibles
$GitTargetRoot = "C:\DemoOfMergeRepo" #Change this as appropriate
$GitTargetFolder = "TargetRepository" #Change this as appropriate
$GitArchiveFolder = "ArchivedBranches" #Change this as appropriate
$GitArchiveTags = "ArchivedTags" #Change this as appropriate
# Set up variables for Git properties
$GitUserName = "Migration Automation Script" #Change this as appropriate
$GitEMail = "my.email@mydomain.tld" #Change this as appropriate
# Set up variable with default URL to repo if all repos are in same provider e.g. GitHub, AzureDevOps
$originRoot = "https://github.com/stevetalkscode/" #Change this as appropriate and ensure this ends with forward-slash!
# Set up variable for branch that holds the name of the branch to merge specified mergeBranch into
# I have set to '__RepoMigration' to avoid conflict with common branch names in existing repos.
# This can alway be renamed before pushing to the new target origin
$newMergeTarget = "__RepoMigration" #Change this as appropriate
# To avoid folder or branch name clashes, set a prefix that should not be present in the source repos
$TempFolderPrefix = "____#####____"; #Change this as appropriate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment