把任意文件夹内所有内容加入Git控制
这个文件夹内,可以是任何文件,也可以是任何一个项目
例如你的笔记,图片,单文件夹的项目等,步骤如下:
git init
git add .
git commit -m "first commit"
但上面只是本地加入Git控制,如果想发布到自己的github,先要在GitHub上建立一个空的仓库
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/YourName/YourRepositoryName.git
git push -u origin master