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!
To clone git repository into a specific folder, you can use -C <path> parameter, e.g. Although it'll still create a whatever folder on top of it, so to clone the content of the repository into current directory, use the following syntax: cd /httpdocs git clone [email protected]:whatever .
You need to organize your dotfiles in some directory. You could do this practically anywhere, like a USB drive or something. Since version control is great, a hosted git repository like GitHub is a great option to store your dotfiles.
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
You are searching for the dot .
?
git clone https://github.com/foo/bar.git .
From the git clone man page:
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>]
Where (target)directory is the last argument. Note that you have to make sure that the current folder .
is empty
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With