Force-push when rewriting history

This commit is contained in:
Commit Report Sync Bot 2025-03-01 23:39:03 -08:00
parent 74290d2101
commit c13ece3f65
7 changed files with 4 additions and 4 deletions

4
dist/index.js vendored
View File

@ -25843,9 +25843,9 @@ async function main(sourceRepo, targetRepo, dryRun, tokenForTargetRepo) {
// OK, that's it - we've processed all the source commits, and we've inserted all the necessary target commits.
// We can just `git push` to the target repo now.
//
// But I'm gonna do a bunch more dry-run testing before I do that!
// Note that it must be a `-f`, because we are literally rewriting history.
if (!dryRun) {
(0, child_process_1.execSync)(`git push https://unused-username:${tokenForTargetRepo}@${targetRepo.domain}/${targetRepo.owner}/${targetRepo.name}`, {
(0, child_process_1.execSync)(`git push -f https://unused-username:${tokenForTargetRepo}@${targetRepo.domain}/${targetRepo.owner}/${targetRepo.name}`, {
cwd: TARGET_DIR
});
// TODO - it'd be nice - before this `git push` is probably best - to add a `README.md` comment acknowledging

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -116,9 +116,9 @@ export async function main(sourceRepo: Repo, targetRepo: Repo, dryRun: boolean,
// OK, that's it - we've processed all the source commits, and we've inserted all the necessary target commits.
// We can just `git push` to the target repo now.
//
// But I'm gonna do a bunch more dry-run testing before I do that!
// Note that it must be a `-f`, because we are literally rewriting history.
if (!dryRun) {
execSync(`git push https://unused-username:${tokenForTargetRepo}@${targetRepo.domain}/${targetRepo.owner}/${targetRepo.name}`, {
execSync(`git push -f https://unused-username:${tokenForTargetRepo}@${targetRepo.domain}/${targetRepo.owner}/${targetRepo.name}`, {
cwd: TARGET_DIR
})
// TODO - it'd be nice - before this `git push` is probably best - to add a `README.md` comment acknowledging