3 Star 0 Fork 0

Gitee 极速下载/git-tfs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/git-tfs/git-tfs
克隆/下载
quick-clone.md 3.23 KB
一键复制 编辑 原始数据 按行查看 历史

Summary

The quick-clone command creates a new git repository, initialized from the last changeset (or a specific changeset in history) in a TFS source tree, ignoring the full history. Useful for making code changes or additions where past history isn't relevant.

Synopsis

Usage: git-tfs quick-clone [options] tfs-url-or-instance-name repository-path <git-repository-path>
where options are:

	-i, --id, --tfs-remote, --remote
		(Type: Value required, Value Type:[String])
		An optional remote ID, useful if this repository will track multiple TFS
			repositories.

	-d, --debug
		(Type: Flag, Value Type:[Boolean])
		Show lots of output.

	-H, -h, --help
		(Type: Flag, Value Type:[Boolean])
		ShowHelp

	-V, --version
		(Type: Flag, Value Type:[Boolean])
		ShowVersion

	--template
		(Type: Value required, Value Type:[String])
		The --template option to pass to git-init.

	--shared
		(Type: Value required, Value Type:[Object])
		The --shared option to pass to git-init.

	--initial-branch
		(Type: Value required, Value Type:[String])
		The --initial-branch option to pass to git-init (requires Git >= 2.28.0).

	--ignore-regex
		(Type: Value required, Value Type:[String])
		If specified, git-tfs will not sync any paths that match this regular expression.

	-p, --Password
		(Type: Value required, Value Type:[String])
		Password for TFS connection

	-u, --Username
		(Type: Value required, Value Type:[String])
		Username for TFS connection

	--ignore-regex
		(Type: Value required, Value Type:[String])
		If specified, git-tfs will not sync any paths that match this regular expression.

	-c, --changeset
		(Type: Value optional, Value Type:[Int32])
		Specify a changeset to clone from

	--fetch-all, --all
		(Type: Flag, Value Type:[Boolean])
		all

	-p, --parents
		(Type: Flag, Value Type:[Boolean])
		parents

Remark

Make sure that you use a local drive (and not a network share) where the clone is stored. git-tfs didn't receive any explicit testing for cloning on a network share and there are known reports like Issue 1373 where cloning/fetching a shelveset didn't work when the clone was done on a network share.

Examples

Simple

To clone the latest changeset in $/Project1 from your TFS server tfs into a new directory Project1, do this:

git tfs quick-clone http://tfs:8080/tfs/DefaultCollection $/Project1

Clone a specific changeset

To clone a specific changeset in the history of $/Project1 from your TFS server tfs into a new directory Project1, do this:

git tfs quick-clone http://tfs:8080/tfs/DefaultCollection $/Project1 -c=126

where 126 is the id of the changeset to clone.

If you want to get all the history from this specific changeset, then just do:

git tfs fetch

Excludes

Let's say you want to clone $/Project, but you don't want to clone exes.

git tfs quick-clone --ignore-regex=exe$ http://tfs:8080/tfs/DefaultCollection $/Project1

Cloning the whole TFS Project Collection

You can clone all projects by specifying $/ as the tfs-repository path. If you do not specify a git repository name, it will clone into tfs-collection.

See also

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/mirrors/git-tfs.git
git@gitee.com:mirrors/git-tfs.git
mirrors
git-tfs
git-tfs
master

搜索帮助