Re: [git-for-windows] Git a single file from remote

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Chaz,

On Mon, 16 Nov 2015, Chaz wrote:

> An origin git repository has been setup.  Added a remote repository 
> (remotegit).
> 
> "git remote -v show" displays both origin and remote links.
> 
> What is the best way to copy a single file from the remote repo to the 
> origin repo?

This is not specific to Windows, so it would be more appropriate to send
this question to the Git mailing list (Cc:ed).

Git is not designed to download specific files, at least not by default.

Having said that, some remotes are configured to allow downloading
archives and in such a case you might be able to specify something like
`git archive --remote=<remote> HEAD:README`, but I am personally unaware
of any remote that supports this.

Your best bet may be to fetch an individual ref with the `--shallow`
option.

Ciao,
Johannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]