(window.webpackJsonp=window.webpackJsonp||[]).push([[1134],{1542:function(t,a,e){"use strict";e.r(a);var s=e(31),r=Object(s.a)({},(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h1",{attrs:{id:"git-tfs"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#git-tfs"}},[t._v("#")]),t._v(" git-tfs")]),t._v(" "),e("h2",{attrs:{id:"git-tfs-clone"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#git-tfs-clone"}},[t._v("#")]),t._v(" git-tfs clone")]),t._v(" "),e("p",[t._v("This will create a folder with the same name as the project, i.e. /My.Project.Name")]),t._v(" "),e("div",{staticClass:"language-git extra-class"},[e("pre",{pre:!0,attrs:{class:"language-git"}},[e("code",[e("span",{pre:!0,attrs:{class:"token command"}},[t._v("$ git tfs clone http://tfs:8080/tfs/DefaultCollection/ $/My.Project.Name")]),t._v("\n\n")])])]),e("h2",{attrs:{id:"git-tfs-clone-from-bare-git-repository"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#git-tfs-clone-from-bare-git-repository"}},[t._v("#")]),t._v(" git-tfs clone from bare git repository")]),t._v(" "),e("p",[t._v("Cloning from a git repository is ten times faster than cloning directly from TFVS and works well in a team environment. At least one team member will have to create the bare git repository by doing the regular git-tfs clone first. Then the new repository can be bootstrapped to work with TFVS.")]),t._v(" "),e("div",{staticClass:"language-git extra-class"},[e("pre",{pre:!0,attrs:{class:"language-git"}},[e("code",[e("span",{pre:!0,attrs:{class:"token command"}},[t._v("$ git clone x:/fileshare/git/My.Project.Name.git ")]),t._v("\n$ cd My.Project.Name \n"),e("span",{pre:!0,attrs:{class:"token command"}},[t._v("$ git tfs bootstrap ")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token command"}},[t._v("$ git tfs pull")]),t._v("\n\n")])])]),e("h2",{attrs:{id:"git-tfs-install-via-chocolatey"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#git-tfs-install-via-chocolatey"}},[t._v("#")]),t._v(" git-tfs install via Chocolatey")]),t._v(" "),e("p",[t._v("The following assumes you will use kdiff3 for file diffing and although not essential it is a good idea.")]),t._v(" "),e("div",{staticClass:"language-git extra-class"},[e("pre",{pre:!0,attrs:{class:"language-git"}},[e("code",[t._v("C:\\> choco install kdiff3\n\n")])])]),e("p",[t._v("Git can be installed first so you can state any parameters you wish. Here all the Unix tools are also installed and 'NoAutoCrlf' means checkout as is, commit as is.")]),t._v(" "),e("div",{staticClass:"language-git extra-class"},[e("pre",{pre:!0,attrs:{class:"language-git"}},[e("code",[t._v("C:\\> choco install git -params "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v("'\"/GitAndUnixToolsOnPath /NoAutoCrlf\"'")]),t._v("\n\n")])])]),e("p",[t._v("This is all you really need to be able to install git-tfs via chocolatey.")]),t._v(" "),e("div",{staticClass:"language-git extra-class"},[e("pre",{pre:!0,attrs:{class:"language-git"}},[e("code",[t._v("C:\\> choco install git-tfs\n\n")])])]),e("h2",{attrs:{id:"git-tfs-check-in"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#git-tfs-check-in"}},[t._v("#")]),t._v(" git-tfs Check In")]),t._v(" "),e("p",[t._v("Launch the Check In dialog for TFVS.")]),t._v(" "),e("div",{staticClass:"language-git extra-class"},[e("pre",{pre:!0,attrs:{class:"language-git"}},[e("code",[e("span",{pre:!0,attrs:{class:"token command"}},[t._v("$ git tfs checkintool")]),t._v("\n\n")])])]),e("p",[t._v("This will take all of your local commits and create a single check-in.")]),t._v(" "),e("h2",{attrs:{id:"git-tfs-push"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#git-tfs-push"}},[t._v("#")]),t._v(" git-tfs push")]),t._v(" "),e("p",[t._v("Push all local commits to the TFVS remote.")]),t._v(" "),e("div",{staticClass:"language-git extra-class"},[e("pre",{pre:!0,attrs:{class:"language-git"}},[e("code",[e("span",{pre:!0,attrs:{class:"token command"}},[t._v("$ git tfs rcheckin")]),t._v("\n\n")])])]),e("p",[t._v("Note: this will fail if Check-in Notes are required. These can be bypassed by adding "),e("code",[t._v("git-tfs-force: rcheckin")]),t._v(" to the commit message.")]),t._v(" "),e("h4",{attrs:{id:"remarks"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#remarks"}},[t._v("#")]),t._v(" Remarks")]),t._v(" "),e("p",[e("a",{attrs:{href:"http://git-tfs.com/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Git-tfs"),e("OutboundLink")],1),t._v(" is a third party tool to connect a Git repository to a Team Foundation Server (“TFS”) repository.")]),t._v(" "),e("p",[t._v("Most remote TFVS instances will request your credentials on every interaction and installing Git-Credential-Manager-for-Windows may not help. It can be overcome by adding your "),e("strong",[t._v("name")]),t._v(" and "),e("strong",[t._v("password")]),t._v(" to your "),e("code",[t._v(".git/config")])]),t._v(" "),e("div",{staticClass:"language-git extra-class"},[e("pre",{pre:!0,attrs:{class:"language-git"}},[e("code",[t._v("[tfs-remote "),e("span",{pre:!0,attrs:{class:"token string"}},[t._v('"default"')]),t._v("]\n url = http://tfs.mycompany.co.uk:8080/tfs/DefaultCollection/\n repository = $/My.Project.Name/\n username = me.name\n password = My733TPwd\n\n")])])])])}),[],!1,null,null,null);a.default=r.exports}}]);