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