3

I have to use TFS for my Mac machine for iPhone app development. So that I have used the following step as from the Git-TF_GettingStarted.html

Extract the contents of Git-TF-Release-Preview.zip to a folder on your local machine, i.e. C:\git-tf on Windows, or /user/git-tf on Mac/Linux. for installation.

But while giving the command "git tf clone http://myserver:8080/tfs $/TeamProjectA/Main " an error is coming as

git: 'tf' is not a git command.

Then I have removed the tf from the command, at that time it get worked and asked the username and password, but authentication get failed.

How can I resolve this issue?, if anybody has idea then please help me.

Philippe
  • 28,207
  • 6
  • 54
  • 78
ani
  • 440
  • 1
  • 5
  • 15

2 Answers2

3

You haven't actually set your PATH variable, which is why you're getting the command not found problem.

If you've set your path, using, as an example: PATH=$PATH:$HOME/git-tf-2.0.2.20130214, then the git command will allow the sub-command tf, which should work like the documentation suggests, as in:

git tf clone …

will work once you've set the PATH variable, otherwise you'll have to reference the git-tf command directly.

The command that is extracted is git-tf, and git is smart enough to look for the git-tf command if you have set the PATH and try to use the operation git tf.

Anya Shenanigans
  • 91,618
  • 3
  • 107
  • 122
  • Thanks for the answer.Let me try this – ani Apr 22 '13 at 12:41
  • I have enterd in to the directory and tried as you said.But while using git-tf ,it is showing the error as "command not found". – ani Apr 22 '13 at 13:23
  • My doubt is there anything missing while installation? – ani Apr 22 '13 at 13:24
  • 1
    There is a file in the folder where you extracted the `.zip` called `git-tf`. Your `PATH` variable needs to reference the directory that this file resides within. e.g. if you extracted into the directory `$HOME/git-tf`, with the file called `$HOME/git-tf/git-tf`, then for bash you would have `export PATH=$PATH:$HOME/git-tf` and then the command `git-tf` would be available to you. You could also invoke it using `./git-tf` if you're in the directory that the `git-tf` file resides – Anya Shenanigans Apr 22 '13 at 13:30
  • As you said I have made the connection and clone a text file to client side from server. Now I am trying TFS with the Xcode. For that I have made local repository and run these commands by staying inside the project folder git init, git add ., git commit -m "Initial commit". After that I have tried to configure using git tf configure http://myserver:8080/tfs/gittfs /Users/{useraccount}/git-tf/Sample . An error came like this "git: 'tf' is not a git command".Then I came to git-tf folder and tried then error came like this "git-tf: not a git repository (or any of the parent directories): .git" – ani Apr 29 '13 at 09:14
  • You need to set your `PATH` variable. To make it persistent you need to put it into your `.profile`, otherwise you'll have to keep setting it every time you launch a shell window. – Anya Shenanigans Apr 29 '13 at 09:35
  • What I really intended to ask is.... I have to connect my project to the tis using Xcode.For that I have searched and done the above things.I think some step is missing,thats why the error comes. I have git-tf folder,inside that I have put my application folder also.I have added and committed the project through comment.My doubt is how to commit my project directly to TFS server through Xcode? File->Source control->Commit/Push ,I have tried this.At that time location is asking.After entering the password what to do? OW if I am using the terminal then how can I do? – ani Apr 29 '13 at 09:48
  • You can't push back to TFS from the XCode UI as it doesn't know the magical incantation `git tfs checkin` to get the changes back into TFS. You have to do that from the command line. – Anya Shenanigans Apr 29 '13 at 10:20
  • Ok,thanks.I have tried to commit the project to the server by using "git tf configure http://myserver/tfs/gittfs $/Users/{useraccount}/git-tf/Sample ".Then I got this error. git-tf: not a git repository (or any of the parent directories): .git. There I am sticking.Do you have any idea?Or is there any mistake in my syntax?? – ani Apr 29 '13 at 11:12
  • cd into your application folder - i.e. where the git repository exista. Do a `git tf configure `, making sure to use the correct tfs server and repository path information. This operates on the local git repository. Then do a `git tf pull` to make sure that your local git repository is up to date wrt TFS. Check that the code works, then do a `git commit` to locally commit the changes. Then push those changes back to TFS using `git tf checkin`. – Anya Shenanigans Apr 29 '13 at 12:03
  • I have given the configure command as below "git tf configure myserver/tfs/iPhone $/Users/{useraccount}/Desktop/CommitTest". Where iPhone is the folder in the server and commitTest is the project which I have to submit to the server.But the error came like this "git-tf: not a git repository (or any of the parent directories): .git". I have done the git init,add .,and commit before this. How do I have to give the local projects path in the configure commas?,just the folder name or project name with xcodeproj extension? – ani Apr 30 '13 at 04:40
  • 1
    you **must** be in a directory of the local git repository to use the `git tf configure` command. If you're not in the local git repository then the command **will not work**. All options for this command are options for the TFS server. The error message you're getting is saying that the current working directory `git-tf` is not a git repository. – Anya Shenanigans Apr 30 '13 at 07:04
  • Yes.Now I have added the git-tf to my project folder and tried.Every thing works fine now.Thanks – ani Apr 30 '13 at 12:14
0

You better go with TFS Everywhere http://www.microsoft.com/en-us/download/details.aspx?id=4240

And use Eclipse like a client for your development in XCode.

Juan
  • 1,352
  • 13
  • 20