Hi Matthew,

If you only provide a relative path, then Git will think you intend to deal
with (eg clone from) a local repository.

If you are using Git with SSH, you can use `~/.ssh/config` to specify a
shortcut. I have something like the following (plus a few non-required
embelishments like ControlMaster/ControlPath/ControlPersist for faster
repeated authentications):

Host gh
User git
Hostname github.com

Then when cloning I just have to use something like:

$ git clone gh:<username>/<repo>

Hope this helps.


~ Tim



On Mon, Oct 23, 2017 at 04:33:23PM -0700, mgarm87 wrote:
> Hi,
> 
> I realise that this may be a bad idea, but as I tend to mostly clone from 
> https://github.com, is there any possibility for git to store a domain by 
> default, so that all I need to type is the relative path?
> 
> Thanks, Matthew
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Git for human beings" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to git-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to