ARYAN TECHIE
2025-04-22 771c05ff1866a32e05fd5926317372405202d640
fix: dynamically detect current branch for quartz sync push (#1930)

1 files modified
3 ■■■■ changed files
quartz/cli/handlers.js 3 ●●●● patch | view | raw | blame | history
quartz/cli/handlers.js
@@ -589,7 +589,8 @@
  await popContentFolder(contentFolder)
  if (argv.push) {
    console.log("Pushing your changes")
    const res = spawnSync("git", ["push", "-uf", ORIGIN_NAME, QUARTZ_SOURCE_BRANCH], {
    const currentBranch = execSync("git rev-parse --abbrev-ref HEAD").toString().trim()
    const res = spawnSync("git", ["push", "-uf", ORIGIN_NAME, currentBranch], {
      stdio: "inherit",
    })
    if (res.status !== 0) {