Fixes#2: https://github.com/yarlson/lnk/issues/2
Previously, files with the same basename (e.g., a/config.json and b/config.json)
would overwrite each other in the repository, causing data loss. The second file
would completely replace the first, and removing files would fail with 'no such
file or directory' errors.
Changes:
- Store files using unique names based on full relative paths (slashes → underscores)
- Track full relative paths in .lnk file instead of just basenames
- Generate repository names from relative paths to prevent collisions
- Update symlink restoration to work with new path-based system
- Add comprehensive tests for basename collision scenarios
This ensures each file maintains its unique content and can be managed
independently, eliminating the data loss issue.
- Add lnk status command to show repository sync status
- Add lnk push command for smart staging, committing, and pushing
- Add lnk pull command with automatic symlink restoration
- Add comprehensive sync functionality to git and core packages
- Add 5 new integration tests for sync commands (17 total tests)
- Update README with sync workflow examples and documentation
- Support commits ahead/behind tracking relative to remote
- Implement change detection to avoid empty commits
- Add graceful error handling for missing remotes
Closes: Phase 1 sync implementation