git

 

 

步骤:
1.在workspace添加git配置文件
 
git init
 
2.添加要上传的代码及文件至Index
 
git add README.md
 
3.提交代码至Repository
 
git commit -m "first commit"
 
4.远程仓库
添加远程仓库(Remote)名及路径
 
 
git remote add origin git.guahao-inc.com:xuyan1/test.git
删除远程仓库
git remote remove origin
 
使用命令 git remote -v 查看你当前的 remote url
 
git remote -v
 
使用命令 git remote set-url 来调整远程url,可以为http方式和SSH方式,下面为SSH方式:
 
git remote set-url origin git@github.com:username/project.git
 
 
5.push,即上传(Repository)代码至远程仓库保存(Remote)
 
git push -u origin master
 
这里origin为远程仓库名 master为分支
 
克隆你的项目到本地
 
  1. git config --global user.name "ASxx"
  2. git config --global user.email "123456789@qq.com"
  3. git clone -b xxx .git地址
  4. git remote add origin https://git.guahao-inc.com/qa-dev/data-factory-static.git
  5. git branch --set-upstream-to=origin/2021-0219-xuyan1 2021-0219-xuyan1
 
 

posted @ 2022-03-22 18:10  xyanzi  阅读(12)  评论(0)    收藏  举报