git 把项目托管到码云

码云:
把项目托管到码云
1.注册并微活码云账号(https://gitee.com/]
2.牛成井前博 SSH公钥 (运行 ssh -t [email protected] 构测 SSH 公明是否有开成功)
3.创建率户的码人伦;库
4.把本地项口上传到码云对应的空白仓库中

第一:上传个新项目
cd existing_git_repo
git remote add origin [email protected]:lijufa/new-ticket.git
git push -u origin "master"

git commit -m "init"
git remote add origin [email protected]:lijufa/new-ticket.git
git push -u origin "master"

git init
git status
git add .
git commit -m 'init project'
git push -u origin "master"
第二:创建分支:
git checkout -b master1
git branch
第3:分支合并和提交
        git add .
        git status
        git commit -m "ti jiao"
        git push -u origin "master1" 
        把master1 分支合并到master分支:
                  1切换到master分支
                            git checkout master
                  2合并master1分支 到master
                          git merge  master1
第4 删除本地master1分支
git branch -d  master1

你可能感兴趣的:(git)