{"thread":{"id":"51586","subject":"Default Clone Dir?","startedAt":"2019-08-04T16:13:45Z","lastAt":"2019-08-04T17:29:33Z","messageCount":3,"participants":["johnywhy@gmail.com","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"379914","messageId":"1564938816.2622.1@gmail.com","threadId":"51586","inReplyTo":null,"subject":"Default Clone Dir?","fromName":"","fromEmail":"johnywhy@gmail.com","sentAt":"2019-08-04T17:13:36Z","receivedAt":"2019-08-04T16:13:45Z","isPatch":false,"sender":{"key":"johnywhy@gmail.com","avatar":null},"body":"hi,\nIs there a way to set default clone destination directory on linux?\nCurrently, seems to clone to the active dir.\n-thx!\n\n\n"},{"id":"379915","messageId":"20190804172008.GG118825@genre.crustytoothpaste.net","threadId":"51586","inReplyTo":"1564938816.2622.1@gmail.com","subject":"Re: Default Clone Dir?","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2019-08-04T17:20:08Z","receivedAt":"2019-08-04T17:20:24Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2019-08-04 at 17:13:36, johnywhy@gmail.com wrote:\n> hi,\n> Is there a way to set default clone destination directory on linux?\n> Currently, seems to clone to the active dir.\n\nIt sounds like you want to always clone repositories to a single\ndirectory. git clone doesn't have a configuration setting to do that,\nbut you can specify the directory you want to clone. For example:\n\n  git clone https://github.com/git/git.git\n\nwould create a directory \"git\" under the current directory, but you\ncould also write the following:\n\n  git clone https://github.com/git/git.git ~/checkouts/git\n\nto create the repository in ~/checkouts/git. You can also do this:\n\n  git -C ~/checkouts clone https://github.com/git/git.git\n\nwhich will change to ~/checkouts and then perform the clone there. \"-C\"\nsays to change directory to the given location before running the\ncommand; it must be specified before the \"clone\" command.\n\nIf you want to automate this, you can create an alias:\n\n  git config --global alias.myclone '!f () { git -C ~/checkouts clone \"$@\"; };f'\n  git myclone https://github.com/git/git.git\n\nand then your alias will always clone to that directory.\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"379916","messageId":"1564943361.2622.2@gmail.com","threadId":"51586","inReplyTo":"20190804172008.GG118825@genre.crustytoothpaste.net","subject":"Re: Default Clone Dir?","fromName":"","fromEmail":"johnywhy@gmail.com","sentAt":"2019-08-04T18:29:21Z","receivedAt":"2019-08-04T17:29:33Z","isPatch":false,"sender":{"key":"johnywhy@gmail.com","avatar":null},"body":"Thx! The alias is super.\n\n\n\n"}]}