I have a bunch of modified files in my git repository and a large number of them are xml files. How do I revert changes (reset modifications) of only the xml files?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
Thank you all for your replies, but I have found, for me, most accurate solution:
sed is user to escape spaces which troubled xargs and everything is working very fast and accurate.
or something equivalent if your system doesn't have
find
andxargs
. Or justgit checkout HEAD **/*.xml
inzsh
or any other shell with this form of reqursive globbing.You don't need
find
orsed
, you can use wildcards as git understands them (doesn't depend on your shell):The quotes will prevent your shell to expand the command to only files in the current directory before its execution.
You can also disable shell glob expansion (with bash) :
This, of course, will irremediably erase your changes!