Git clone to home directory with PowershellGit, Powershell, %HOME% and multiple reposCygwin - Repo with...
How do I express some one as a black person?
Single word request: Harming the benefactor
What is the chance of making a successful appeal to dismissal decision from a PhD program after failing the qualifying exam in the 2nd attempt?
Why is this plane circling around the Lucknow airport every day?
Force user to remove USB token
Logic. Truth of a negation
Replacing Windows 7 security updates with anti-virus?
Extra alignment tab has been changed to cr. } using table, tabular and resizebox
How do I locate a classical quotation?
Should I tell my boss the work he did was worthless
Why is there a voltage between the mains ground and my radiator?
How to create a hard link to an inode (ext4)?
What does a stand alone "T" index value do?
MTG: Can I kill an opponent in response to lethal activated abilities, and not take the damage?
If the Captain's screens are out, does he switch seats with the co-pilot?
Look through the portal of every day
Is there any way to damage Intellect Devourer(s) when already within a creature's skull?
In the late 1940’s to early 1950’s what technology was available that could melt a LOT of ice?
Word for a person who has no opinion about whether god exists
They call me Inspector Morse
PTIJ: Why can't I eat anything?
Why would one plane in this picture not have gear down yet?
Is there a window switcher for GNOME that shows the actual window?
What Happens when Passenger Refuses to Fly Boeing 737 Max?
Git clone to home directory with Powershell
Git, Powershell, %HOME% and multiple reposCygwin - Repo with Separate Git/Working Dir Doesn't WorkCan't clone from Bitbucket - Get stuck at “Cloning into…”git clone replicates submodules, but they are not repos anymoreHow to install mintty into 'Git Bash' on windows?Text pipe not working in powershellGit, can't clone new working copyHow to access Bash on Ubuntu through Git Bash?Why doesn't git work with File Explorer's “Open Windows PowerShell”?Git is considering my whole user folder as a repository
I used to work with cmd.exe
on Win 10, but recently switched to Powershell.
With cmd.exe
both
cd %USERPROFILE%example
and
git clone https://github.com/user/example.git %USERPROFILE%example
work like intended. Since %USERPROFILE%
does not work in Powershell, I use ~
instead.
However, when I'm for instance in C:
and enter the command cd ~/example
in Powershell, I will end up in the folder C:UsersJohnDoeexample
(as intended).
But when I run
git clone https://github.com/user/example.git ~/example
the repo gets cloned not to my home directory, but to C:~example
.
Is there a way to use ~
with the git clone command in Powershell?
windows command-line powershell git
bumped to the homepage by Community♦ 5 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 2 more comments
I used to work with cmd.exe
on Win 10, but recently switched to Powershell.
With cmd.exe
both
cd %USERPROFILE%example
and
git clone https://github.com/user/example.git %USERPROFILE%example
work like intended. Since %USERPROFILE%
does not work in Powershell, I use ~
instead.
However, when I'm for instance in C:
and enter the command cd ~/example
in Powershell, I will end up in the folder C:UsersJohnDoeexample
(as intended).
But when I run
git clone https://github.com/user/example.git ~/example
the repo gets cloned not to my home directory, but to C:~example
.
Is there a way to use ~
with the git clone command in Powershell?
windows command-line powershell git
bumped to the homepage by Community♦ 5 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
git clone https://github.com/user/example.git $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath('~/example')
– PetSerAl
Apr 24 '18 at 13:55
or you just use$env:userprofile
instead of%userprofile%
– SimonS
Apr 25 '18 at 6:16
Thank you! Although$ExectionContext....
would take even more typing than just the normal path ;) I guess I will go with$env:userprofile
for now, but it would be nice if~
works in all cases
– josh21
Apr 25 '18 at 7:46
I assume this is because of git, or is the culprit Windows/Powershell?
– josh21
Apr 25 '18 at 7:51
why would you need to use~
when$env:userprofile
works as intended?
– SimonS
Apr 25 '18 at 10:02
|
show 2 more comments
I used to work with cmd.exe
on Win 10, but recently switched to Powershell.
With cmd.exe
both
cd %USERPROFILE%example
and
git clone https://github.com/user/example.git %USERPROFILE%example
work like intended. Since %USERPROFILE%
does not work in Powershell, I use ~
instead.
However, when I'm for instance in C:
and enter the command cd ~/example
in Powershell, I will end up in the folder C:UsersJohnDoeexample
(as intended).
But when I run
git clone https://github.com/user/example.git ~/example
the repo gets cloned not to my home directory, but to C:~example
.
Is there a way to use ~
with the git clone command in Powershell?
windows command-line powershell git
I used to work with cmd.exe
on Win 10, but recently switched to Powershell.
With cmd.exe
both
cd %USERPROFILE%example
and
git clone https://github.com/user/example.git %USERPROFILE%example
work like intended. Since %USERPROFILE%
does not work in Powershell, I use ~
instead.
However, when I'm for instance in C:
and enter the command cd ~/example
in Powershell, I will end up in the folder C:UsersJohnDoeexample
(as intended).
But when I run
git clone https://github.com/user/example.git ~/example
the repo gets cloned not to my home directory, but to C:~example
.
Is there a way to use ~
with the git clone command in Powershell?
windows command-line powershell git
windows command-line powershell git
asked Apr 24 '18 at 13:32
josh21josh21
63
63
bumped to the homepage by Community♦ 5 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 5 mins ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
git clone https://github.com/user/example.git $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath('~/example')
– PetSerAl
Apr 24 '18 at 13:55
or you just use$env:userprofile
instead of%userprofile%
– SimonS
Apr 25 '18 at 6:16
Thank you! Although$ExectionContext....
would take even more typing than just the normal path ;) I guess I will go with$env:userprofile
for now, but it would be nice if~
works in all cases
– josh21
Apr 25 '18 at 7:46
I assume this is because of git, or is the culprit Windows/Powershell?
– josh21
Apr 25 '18 at 7:51
why would you need to use~
when$env:userprofile
works as intended?
– SimonS
Apr 25 '18 at 10:02
|
show 2 more comments
git clone https://github.com/user/example.git $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath('~/example')
– PetSerAl
Apr 24 '18 at 13:55
or you just use$env:userprofile
instead of%userprofile%
– SimonS
Apr 25 '18 at 6:16
Thank you! Although$ExectionContext....
would take even more typing than just the normal path ;) I guess I will go with$env:userprofile
for now, but it would be nice if~
works in all cases
– josh21
Apr 25 '18 at 7:46
I assume this is because of git, or is the culprit Windows/Powershell?
– josh21
Apr 25 '18 at 7:51
why would you need to use~
when$env:userprofile
works as intended?
– SimonS
Apr 25 '18 at 10:02
git clone https://github.com/user/example.git $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath('~/example')
– PetSerAl
Apr 24 '18 at 13:55
git clone https://github.com/user/example.git $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath('~/example')
– PetSerAl
Apr 24 '18 at 13:55
or you just use
$env:userprofile
instead of %userprofile%
– SimonS
Apr 25 '18 at 6:16
or you just use
$env:userprofile
instead of %userprofile%
– SimonS
Apr 25 '18 at 6:16
Thank you! Although
$ExectionContext....
would take even more typing than just the normal path ;) I guess I will go with $env:userprofile
for now, but it would be nice if ~
works in all cases– josh21
Apr 25 '18 at 7:46
Thank you! Although
$ExectionContext....
would take even more typing than just the normal path ;) I guess I will go with $env:userprofile
for now, but it would be nice if ~
works in all cases– josh21
Apr 25 '18 at 7:46
I assume this is because of git, or is the culprit Windows/Powershell?
– josh21
Apr 25 '18 at 7:51
I assume this is because of git, or is the culprit Windows/Powershell?
– josh21
Apr 25 '18 at 7:51
why would you need to use
~
when $env:userprofile
works as intended?– SimonS
Apr 25 '18 at 10:02
why would you need to use
~
when $env:userprofile
works as intended?– SimonS
Apr 25 '18 at 10:02
|
show 2 more comments
1 Answer
1
active
oldest
votes
That is strange. You could create the directory first, then use tab completion:
C:> mkdir ~/example
C:> git clone https://github.com/user/example.git ~/ex<[Tab]>
C:> git clone https://github.com/user/example.git C:UsersJoshexample
or use the $HOME variable:
C:> git clone https://github.com/user/example.git $HOME/example
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1316785%2fgit-clone-to-home-directory-with-powershell%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
That is strange. You could create the directory first, then use tab completion:
C:> mkdir ~/example
C:> git clone https://github.com/user/example.git ~/ex<[Tab]>
C:> git clone https://github.com/user/example.git C:UsersJoshexample
or use the $HOME variable:
C:> git clone https://github.com/user/example.git $HOME/example
add a comment |
That is strange. You could create the directory first, then use tab completion:
C:> mkdir ~/example
C:> git clone https://github.com/user/example.git ~/ex<[Tab]>
C:> git clone https://github.com/user/example.git C:UsersJoshexample
or use the $HOME variable:
C:> git clone https://github.com/user/example.git $HOME/example
add a comment |
That is strange. You could create the directory first, then use tab completion:
C:> mkdir ~/example
C:> git clone https://github.com/user/example.git ~/ex<[Tab]>
C:> git clone https://github.com/user/example.git C:UsersJoshexample
or use the $HOME variable:
C:> git clone https://github.com/user/example.git $HOME/example
That is strange. You could create the directory first, then use tab completion:
C:> mkdir ~/example
C:> git clone https://github.com/user/example.git ~/ex<[Tab]>
C:> git clone https://github.com/user/example.git C:UsersJoshexample
or use the $HOME variable:
C:> git clone https://github.com/user/example.git $HOME/example
answered May 7 '18 at 11:53
Nick CoxNick Cox
1011
1011
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1316785%2fgit-clone-to-home-directory-with-powershell%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
git clone https://github.com/user/example.git $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath('~/example')
– PetSerAl
Apr 24 '18 at 13:55
or you just use
$env:userprofile
instead of%userprofile%
– SimonS
Apr 25 '18 at 6:16
Thank you! Although
$ExectionContext....
would take even more typing than just the normal path ;) I guess I will go with$env:userprofile
for now, but it would be nice if~
works in all cases– josh21
Apr 25 '18 at 7:46
I assume this is because of git, or is the culprit Windows/Powershell?
– josh21
Apr 25 '18 at 7:51
why would you need to use
~
when$env:userprofile
works as intended?– SimonS
Apr 25 '18 at 10:02