Wednesday, March 25, 2015

Create a new GIT repository - Connect a local git repository to a server

mkdir /path/to/your/project 
cd /path/to/your/project
git init 
git remote add origin https://user@hostname/path/to/git/repository.git
 
 
echo "This is for creating a new file." >> readme.txt
git add readme.txt
git commit -m 'Initial commit' 
git push -u origin master 

No comments:

Post a Comment