Skip to content
  • Duy Nguyen's avatar
    restore: add --intent-to-add (restoring worktree only) · f0080ed8
    Duy Nguyen authored
    "git restore --source" (without --staged) could create new files
    (i.e. not present in index) on worktree to match the given source. But
    the new files are not tracked, so both "git diff" and "git diff
    <source>" ignore new files. "git commit -a" will not recreate a commit
    exactly as the given source either.
    
    Add --intent-to-add to help track new files in this case, which is the
    default on the least surprise principle.
    f0080ed8