1.拷贝一份代码到本地git clone ""
2.提交代码 git add .
git commit -m ""
git push
3.拉分支
git checkout -b newBranch
关联远程,或者远程开分支
git push originnewBranch
自动在远程新开一个分支对应本地的newBranch
4.分支代码合并master
git checkout master
git mergetest_branch(此处test_branch就是分支名)
*******************华丽的分割线***************上传本地代码到github**************************
2.提交代码 git add .
3.拉分支
git checkout -b newBranch
4.分支代码合并master
*******************华丽的分割线***************上传本地代码到github**************************
第一步:cd到你的本地项目根目录下,执行git命令:
git init
第二步:将项目的文件添加到仓库:
git add .
第三步:将所有改动提交:
git commit -m "添加所有文件"
第四步:在github上找到线上仓库地址copy下来(如果没有的话先创建)
第五步:将本地的仓库与github的仓库关联
git remote add origin https://..........
第六步:上传github前前更新一下:
git pull origin master
第七步:
git push -u origin master
到此就算是完成了。