Computer Science Mojo

~ David's Notes on coding, software and computer science




Post

How to turn existing folder into Git repo

Category: Git     Tag: Git  
By: David     On: Fri 22 July 2016     

Have a directory that you want to be linked to a Git repo ?

Code

Replace https://github.com/zhenyufu/zhenyufu.github.io.git with your repo url:

git init
git remote add origin https://github.com/zhenyufu/zhenyufu.github.io.git
git pull origin master

git add .
git commit -m 'added files'
git push origin master