0

I set up a git repository on a VM which is working pretty fine. I cloned the repository on my local computer and tested it with a simple file, all worked.

What I want to do now is to commit some files from my development directory to my git repository, but when I do I have the following error message :

error: src refspec master does not match any.
error: can't push references to 'git@github.com:ezsystems/ezplatform.git'

Strange thing is that my repo is not "git@github.com:ezsystems/ezplatform.git", I normally push my files with an SSH connection to my virtual git server ! Also, because I am working on web project, I did a symbolic link of my development directory directly into my local git repo. I don't think it is a problem. I also have this message when I want to push a file who is in my development directory :

git commit -m "adding files"
Actually on no branch
Modifications that will not be validated : 
     [bunch of file names]
No modification add to the validation

Do you have any clues to help me solve this problem ?

Alessandro Cuttin
  • 3,822
  • 1
  • 30
  • 36
Ecterion
  • 161
  • 3
  • 19

1 Answers1

0
git remote add origin ssh://[user]@[server_address]/[git_repo_url]

This will create a git remote named origin. Each part is broken down below:-

The [user] should be replaced by a user on the server that has read and write access to the git repo.

The [server_address] is the FQDN of the server hosting your git repo.

The [git_repo_url] is the location of the git repo on the server.

For pushing your repo type this command:-

git push -u origin master
akshay_rahar
  • 1,661
  • 2
  • 18
  • 20
  • Thank you for you response. I managed to find why I had "'git@github.com:ezsystems/ezplatform.git'" message. My directory already had a ".git" directory which was in conflict with my private git. I deleted this directory and clone mine inside to replace it. Everything work fine now, and I don't have to use any symbolic link :D – Ecterion Mar 16 '16 at 09:25