Skip to content

Commit

Permalink
Make target to remove untracked markers and make commit + merges easier
Browse files Browse the repository at this point in the history
  • Loading branch information
brandur committed Sep 10, 2023
1 parent 196d177 commit 7eb35b9
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,23 @@ reboot: sigusr2
.PHONY: restart
restart: sigusr2

# Remove untracked `.marker` files, which can be useful in cases where markers
# have been committed to the Git repository on one computer, and Git is now
# preventing a pull on a different one because it'd overwrite local markers
# (that are functionally the same thing but considered different).
#
# Remove all untracked markers:
#
# make rm-markers
#
# Remove untracked markers in a specific directory:
#
# make DIR="/content/photographs/sequences" rm-markers
#
.PHONY: rm-markers
rm-markers:
git ls-files $(DIR) --others --exclude-standard | egrep '\.marker$$' | xargs -n1 rm

.PHONY: test
test:
go test ./...
Expand Down

0 comments on commit 7eb35b9

Please sign in to comment.