$ git clone ssh://host/repo.git ~/
destination directory '/home/username/' already exists.
誰でもこの作品を作成する方法を教えてもらえますか?私はすぐに一般的なdevスクリプトと設定を複製できるようにしようとしています。その後git cloneをホームディレクトリに追加する
$ git clone ssh://host/repo.git ~/
destination directory '/home/username/' already exists.
誰でもこの作品を作成する方法を教えてもらえますか?私はすぐに一般的なdevスクリプトと設定を複製できるようにしようとしています。その後git cloneをホームディレクトリに追加する
これは動作するようです:
cd ~
git init
git remote add origin ssh://host/repo.git
git pull origin master
cd ~
git clone ssh://host/repo.git
別のフォルダ名でプロジェクトを持っているしたい場合は、/home/username/repo/
ディレクトリ
に(例えば 'FOO /')をプロジェクトを持っている
mkdir ~/foo
cd ~/foo
git clone ssh://host/repo.git foo/
ホームディレクトリでチェックアウトしたいのですが。 – rich
Iだろうリポジトリをサブディレクトリにクローンします。
git clone ssh://your/git/repo.git ~/repo
設定ファイルへのシンボリックリンクを作成します。
$ git clone ssh://host/repo.git ~/your_directory
clone
が~/your_directory
を作成します:あなたが第二引数を渡すとき
ln -s ~/repo/.bashrc ~/.bashrc
それは私がそれをクローンしたいすべてのマシンのレポにあるすべてのファイルに対して悪夢になるでしょう。 – rich
もちろん、そのためのシェルスクリプトも作成します。[Github example](https://github.com/Mytho/dotfiles/blob/master/setup.sh) –
'Gitのclone'は、現用パスの下に、または指定されたパスに新しいディレクトリを作成するかに見えます。 '〜/'はすでに存在するので、新しいディレクトリを作成することはできません。 –
gitリポジトリからあなたのホームディレクトリ全体を実際にプルしたいですか?またはサブディレクトリに? –
はい、リポジトリ内のすべてのファイルがホームディレクトリに属しています。 – rich