本地代码上传 -> Github
首先在控制台cd到你的本地项目,这里以teat为例
1.执行命令: git init
2.将项目文件添加到仓库中: git add . (可以是指定文件,将“.”转换为指定文件)
3.接下来commit添加的文件: git commit -m '将teat的所有文件commit到仓库'
4.在你的GitHub账号上new repository一个仓库,
点击Create respository,之后command+C 将仓库地址https://github.com/White007/gitTest复制
5.将本地仓库关联到GitHub上: git remote add origin https://github.com/White007/gitTest
6.上传到GitHub仓库:git push -u origin master
中间可能会让你输入GitHub的账号密码,输入就行了。