Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,12 @@ clean-all: ## Delete ALL old Nix generations and garbage collect (nuclear).
@echo "✅ Full cleanup complete"

.PHONY: reset
reset: git-submodule-sync ## Reset git status to clean (restore all changes and reinitialize submodules).
reset: ## Reset git status to clean (restore all changes and reinitialize submodules).
@echo "🔄 Resetting git status to clean..."
@git checkout -- .
@git reset --hard HEAD
@git submodule foreach --recursive 'git reset --hard HEAD && git clean -fd'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit — asymmetric cleanup: The submodule foreach step cleans untracked files inside each submodule with git clean -fd, but there's no equivalent git clean -fd at the parent. git reset --hard HEAD on line 290 only touches tracked/staged files, so someone running make reset expecting a clean tree will still see untracked files at the top level while submodules are pristine. If preserving parent untracked files is intentional (safety net), ignore; otherwise consider adding @git clean -fd here for symmetry.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit — ignored files retained: git clean -fd does not remove .gitignored files inside submodules. If the intent of make reset is to produce a fully pristine tree (e.g., wipe generated caches/artifacts), use git clean -fdx. If retaining caches is intentional, this is fine as-is.

@git submodule sync --recursive
@git submodule update --init --recursive --force
@echo "✅ Git status reset to clean"

.PHONY: services
Expand Down Expand Up @@ -1382,7 +1385,7 @@ systemctl-tmux-session-logger: ## Restart tmux-session-logger systemd timer and
.PHONY: git-submodule-sync
git-submodule-sync: ## Sync and update git submodules.
@echo "🔁 Syncing and updating git submodules..."
@git submodule sync
@git submodule sync --recursive
@git submodule update --init --recursive
@echo "✅ Submodules synced and updated"

Expand Down
2 changes: 1 addition & 1 deletion dotagents
Loading