The command git clone git@github.com:whatever creates a directory named whatever containing a Git repository:
./ whatever/ .git
I want the contents of the Git repository cloned into my current directory ./ instead:
./ .git
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Option A:
Ergo, for
right hereuse:Option B:
Move the
.gitfolder, too. Note that the.gitfolder is hidden in most graphical file explorers, so be sure to show hidden files.The first line grabs all normal files, the second line grabs dot-files. It is also possibe to do it in one line by enabling dotglob (i.e.
shopt -s dotglob) but that is probably a bad solution if you are asking the question this answer answers.Better yet:
Keep your working copy somewhere else, and create a symbolic link. Like this:
For your case this would be something like:
Which easily could be changed to test if you wanted it, i.e.:
without moving files around. Added
-fnin case someone is copying these lines (-fis force,-navoid some often unwanted interactions with already and non-existing links).If you just want it to work, use Option A, if someone else is going to look at what you have done, use Option C.