How to git clone dotfiles to my home directory with a single command?

When you do the typical git clone https://github.com/foo/bar.git , you get a folder in the current directory with all the files found in this directory.

I am looking for an optional command line argument that allows you to drop all files from this git repository (including .git itself) into the directory from which you issue the clone command.

I use bash if this is due to the fact that you are ahead of time!

+5
source share
2 answers

I see what you want. You can run the git repository in your home directory, and then add the remote start and pull.

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

Are you looking for a point .?

git clone https://github.com/foo/bar.git .

git:

git clone [--template=<template_directory>]
          [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
          [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
          [--separate-git-dir <git dir>]
          [--depth <depth>] [--recursive|--recurse-submodules] [--] <repository>
          [<directory>]

() . , , .

0

All Articles