Add private GIT repository

Create new repository on a server

git init --bare my-project.git

Clone repository on a local computer

git clone username@host:/path/to/repository

Add files to GIT

git add *

Commit files to HEAD

git commit -m "Commit message"

Push to remote

git push origin master

Push to remote if it wasn’t cloned from it

git remote add origin server


Leave a Reply

Your email address will not be published. Required fields are marked *