mardi 4 août 2015

setup git on an existing project in AWS EC2 instance

Need to use version control in one of the old project which resides in Amazon EC2 instance. Steps performed:

/www/box/

  1. Installed GIT on the server and initialised the folder /box/

    git init
    
    
  2. Cloned the project in local computer

  3. Changed a file and tried to push but received error

    git push origin master
    Error: Updating the current branch in a non bare repository is denied
    
    
  4. Then created another repo folder on server and used --bare tag to initialize

    /www/repos/
    git init --bare
    
    
  5. PUSH command works well on this repository

  6. Then added another REMOTE URL to the old project location git remote add production ssh:---/www/box/

Questions:

  • git push gives me the same error when pushing on to the production repo. How do I push to this production repo?

    git push production master
    Error: .... non bare repository is denied
    
    
  • found lots of tutorial using HOOKS, still confused if using HOOKS is a normal method to push in GIT



Aucun commentaire:

Enregistrer un commentaire