Git unstash all files from list
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I created a list by using
$ git stash show --name-only | grep -i "Kopie"
Output:
A - Kopie.txt
B - Kopie.txt
How can I unstash all the files from the list?
First Approach:
$ git stash show --name-only | grep -i "Kopie" | xargs git checkout stash@0 --
Result:
error: pathspec 'A' did not match any file(s) known to git.
error: pathspec '-' did not match any file(s) known to git.
error: pathspec 'Kopie.txt' did not match any file(s) known to git.
error: pathspec 'B' did not match any file(s) known to git.
error: pathspec '-' did not match any file(s) known to git.
error: pathspec 'Kopie.txt' did not match any file(s) known to git.
git xargs
add a comment |Â
up vote
1
down vote
favorite
I created a list by using
$ git stash show --name-only | grep -i "Kopie"
Output:
A - Kopie.txt
B - Kopie.txt
How can I unstash all the files from the list?
First Approach:
$ git stash show --name-only | grep -i "Kopie" | xargs git checkout stash@0 --
Result:
error: pathspec 'A' did not match any file(s) known to git.
error: pathspec '-' did not match any file(s) known to git.
error: pathspec 'Kopie.txt' did not match any file(s) known to git.
error: pathspec 'B' did not match any file(s) known to git.
error: pathspec '-' did not match any file(s) known to git.
error: pathspec 'Kopie.txt' did not match any file(s) known to git.
git xargs
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I created a list by using
$ git stash show --name-only | grep -i "Kopie"
Output:
A - Kopie.txt
B - Kopie.txt
How can I unstash all the files from the list?
First Approach:
$ git stash show --name-only | grep -i "Kopie" | xargs git checkout stash@0 --
Result:
error: pathspec 'A' did not match any file(s) known to git.
error: pathspec '-' did not match any file(s) known to git.
error: pathspec 'Kopie.txt' did not match any file(s) known to git.
error: pathspec 'B' did not match any file(s) known to git.
error: pathspec '-' did not match any file(s) known to git.
error: pathspec 'Kopie.txt' did not match any file(s) known to git.
git xargs
I created a list by using
$ git stash show --name-only | grep -i "Kopie"
Output:
A - Kopie.txt
B - Kopie.txt
How can I unstash all the files from the list?
First Approach:
$ git stash show --name-only | grep -i "Kopie" | xargs git checkout stash@0 --
Result:
error: pathspec 'A' did not match any file(s) known to git.
error: pathspec '-' did not match any file(s) known to git.
error: pathspec 'Kopie.txt' did not match any file(s) known to git.
error: pathspec 'B' did not match any file(s) known to git.
error: pathspec '-' did not match any file(s) known to git.
error: pathspec 'Kopie.txt' did not match any file(s) known to git.
git xargs
edited Jun 7 at 16:33
asked Jun 7 at 9:19
Black
4932728
4932728
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
accepted
You are not quoting the filenames when they are passed to git checkout
, so A
, -
& Kopie.txt
are being treated as different files.
Try adding the -I
option to xargs
, then put quotes around :
git stash show --name-only | grep -i "Kopie" | xargs -I git checkout stash@0 -- ""
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
You are not quoting the filenames when they are passed to git checkout
, so A
, -
& Kopie.txt
are being treated as different files.
Try adding the -I
option to xargs
, then put quotes around :
git stash show --name-only | grep -i "Kopie" | xargs -I git checkout stash@0 -- ""
add a comment |Â
up vote
2
down vote
accepted
You are not quoting the filenames when they are passed to git checkout
, so A
, -
& Kopie.txt
are being treated as different files.
Try adding the -I
option to xargs
, then put quotes around :
git stash show --name-only | grep -i "Kopie" | xargs -I git checkout stash@0 -- ""
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
You are not quoting the filenames when they are passed to git checkout
, so A
, -
& Kopie.txt
are being treated as different files.
Try adding the -I
option to xargs
, then put quotes around :
git stash show --name-only | grep -i "Kopie" | xargs -I git checkout stash@0 -- ""
You are not quoting the filenames when they are passed to git checkout
, so A
, -
& Kopie.txt
are being treated as different files.
Try adding the -I
option to xargs
, then put quotes around :
git stash show --name-only | grep -i "Kopie" | xargs -I git checkout stash@0 -- ""
answered Jun 7 at 9:35
rusty shackleford
1,135115
1,135115
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f448371%2fgit-unstash-all-files-from-list%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password