建立学习的第一站吧,从头开始。欢迎大家跟我一起学习~ 这里也是为了记录自己的学习之路!——by xln
1. 将项目上传到github上去,首先进入github, 创建一个新资料库
2. 创建名称,写好说明可以直接完成
3. 在IDEA的Terminal终端对项目仓库进行初始化
git init #初始化仓库
git status #查看文件状态
git add . #文件缓存
git status #重复查看文件状态
git commit -m "init first" #文件提交,初始化文件仓库
git remote add origins https://github.com/Xlny/community.git #添加一个远程地址
git push -u origins master #推送分支
添加一个README.md文件后
git add .
git commit -m "readme file"
git status
在没有push文件之前,修改了文档内容,使用以下命令
git commit --amend --no-edit #amend追加刚才变化的文件 no-edit不需要改备注文案,只追加内容
git push
4. 刷新一下,可以看到github上面已经成功建立起了一个文件库