How to git clone dotfiles into my home directory with one command?

bash, git

Solution

I see what you want. You can init a git repository to your home directory then add a remote origin and pull.

cd
git init
git remote add origin https://github.com/foo/bar.git
git pull

Problem

When you do a typical "git clone https://github.com/foo/bar.git" you get a folder in the current directory with all the files found in that directory. What I'm looking for is an optional command line arg that lets you drop all the files from that git repo (including the .git itself) in the directory you issue the clone command from. I'm using bash if that is a concern -thank you in advance!

Original source