# How to set up GIT on FreeBSD



## samsam9988 (Nov 30, 2014)

I have installed git from the ports tree. But when I execute `git push..`, it shows the following error: 
	
	



```
git remote add TestDateX git@morfeus:base/TestDateX.git
fatal: Not a git repository (or any of the parent directories): .git
```

Here is the /git directory setup: 
	
	



```
root@morfeus:/git # pwd
/git
root@morfeus:/git # ls -l
total 12
drwx------  2 git  git  512 Nov 29 14:47 .ssh
drwxrwxr-x  4 git  git  512 Nov 30 02:54 base
drwxr-xr-x  2 git  git  512 Nov 30 00:52 git-shell-commands
root@morfeus:/git # cd base
root@morfeus:/git/base # ls -l
total 8
drwxr-xr-x  6 root  git  512 Nov 30 02:54 TestDateX.git
drwxrwxr-x  6 root  git  512 Nov 29 14:50 test.git
```
 Your suggestion and help is very appreciated.

Thanks
Sam


----------



## nakal (Nov 30, 2014)

The directory you are inside on the client side seems not to be a git project directory. Did you clone the remote git project properly?


----------



## samsam9988 (Nov 30, 2014)

Assuming remote git is a server, and I want to transfer my local source code to the remote git server. How can I do that? Any pointers and suggestion is very appreciated.

Thanks
Sam


----------



## nakal (Nov 30, 2014)

There is a cool book online how to use Git. It is not a problem with FreeBSD, but with using third party software. You should simply take some time and read about it.


----------

