Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--exclude-dir=.git is to prevent the git index files from being modified. #1

Open
Yulv-git opened this issue Jun 6, 2022 · 1 comment

Comments

@Yulv-git
Copy link
Owner

Yulv-git commented Jun 6, 2022

sed -i "s/${item_key}/${item_value}/g" `egrep "${item_key}" -rl ${target_dir} --exclude-dir=.git`

@Yulv-git Yulv-git changed the title --exclude-dir=.git is to prevent the git index from being modified. --exclude-dir=.git is to prevent the git index files from being modified. Jun 6, 2022
@Yulv-git
Copy link
Owner Author

Yulv-git commented Jun 6, 2022

If you accidentally modify the git index files, it will cause a Git fatal: Unknown index entry format xxx error. You can undo changes with the following command:
rm -f .git/index
git reset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant