“Git Checkout spezifische Dateitypen nur” Code-Antworten

Git Checkout spezifische Dateitypen nur

# BASH (Non-Fish compliant script)
git checkout origin/master -- `git ls-tree origin/master -r --name-only | grep ".pex"`
gdfelt

Git Checkout spezifische Dateitypen

# You don't need find or sed, you can use wildcards as git understands them (doesn't depend on your shell):
git checkout -- "*.xml"

# 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) :

set -f
git checkout -- *.xml

# This, of course, will irremediably erase your changes!\
gdfelt

Ähnliche Antworten wie “Git Checkout spezifische Dateitypen nur”

Fragen ähnlich wie “Git Checkout spezifische Dateitypen nur”

Weitere verwandte Antworten zu “Git Checkout spezifische Dateitypen nur” auf Shell/Bash

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen