git命令

1 篇文章 0 订阅

git命令

切换分支提交代码:

切换分支
更新代码
git merge origin/切换前的分支
$ git push


git clone -b n-develop git@gitlab.sinosoft.com.cn:IE6_TCM2/DR_WEB_FRONT.git

放弃某个文件的修改
#git checkout src/setupProxy.js

git branch n-develop-hlj
1.列出所有分支

git branch -a

2.创建test分支

git branch test

3.切换到test分支:

git checkout test

git clone https://gitee.com/yiyezhiq/sald.git
cd DR_WEB_FRONT
git stash 将本地修改储存起来,然后再Git pull 就可以了呢。
git stash list
git stash pop

@10.255.3.52:

1 先切换到别的分支: git checkout dev_20180927
2 删除本地分支: git branch -d dev_20181018
3 如果删除不了可以强制删除,git branch -D dev_20181018
4 有必要的情况下,删除远程分支:git push origin --delete dev_20181018
5 上传新分支到远程git push origin test

git clone -b n-develop-c http://gitlab.sinosoft.com.cn:8777/IE6_TCM2/DR_WEB_FRONT.git
克隆
git clone https://gitee.com/yiyezhiq/sald.git
提交
git status
git add .
git reset .
git commit -m “信息”
git push
更新代码
git pull
切换分支
git checkout -b whhc_new origin/whhc_new

git branch #查看所有分支
git checkout -b dev #创建分支dev
git checkout 分支名 #切换分支
git push origin HEAD -u #将新创建的分支信息推送到github

git remote add origin https://gitee.com/yiyezhiq/sald.git
git remote rm origin
git remote -v

git remote add origin https://gitee.com/yiyezhiq/sald.git
git push -u origin master --mirror https://gitee.com/yiyezhiq/sald.git

push 回滚

git reset --hard {commitId}
git push origin {分支} --force

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值