Git学习笔记
提交代码
- 本地初始化环境
git init
- 创建服务关联到仓库
git remote add duckfarm http://username:password@xxxx.git
- 拉取服务器仓库的环境
git pull --rebase duckfarm master
- 创建分支
git branch localbranch
- 在分支中工作
git checkout localbranch
- 提交分支的文件到本地仓库
- 暂存
git add . - 提交
git commit -a -m "Day 0 Note"
- 暂存
- 同步本地代码到服务器仓库
git push --set-upstream duckfarm localbranch
看到这行红色小字,说可能会丢失环境变量,我也没多在意,我打开了我的系统环境变量看了眼,也没找到怎么备份(现在知道了?),觉得我脸不会这么黑吧。(事实证明我不该怀疑我的血统。。。)