当dev完成一个版本的测试后,合并到master
git merge dev
在本地创建dev分支,需要 git push origin dev 同步到远程
git merge dev 不需要进行git add 等操作,它自动完成了
Git默认会用Fast forward模式,但这种模式下,删除分支后,会丢掉分支信息,一般情况下应该使用 git merge --no-ff -m "merge with no-ff" dev
当我们在自己的分支开发时,突然接到项目经理的反馈的一个bug,但是此时我们工作区有缓存数据,只需要使用 git stash
创建并切换分支
git checkout -b dev
切换分支
git check dev
查看当前分支
git branch
删除分支
git branch -d dev
更新项目组文件夹内容
git reset --hard
--no-ff git branch -d '' 后,在git log 可以看到信息
git merge --no-ff -m "merge with no-ff" dev
git pull
git pull = git fetch + git merge origin/master
git config
git config --global user.name "username"
git config --global user.email "email"
git branch -D <name>
git rm -r --cached
error: cannot open .git/FETCH_HEAD: Permission denied
# 未授予权限,在post-receive中产生了一个关联操作,故报错
chown -R git:git /data/wwwroot/deploy/tools/
Failed to connect to github.com port 443: Timed out
# 公司内网需设置
# 设置ss
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'
# 设置代理
git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
# 查看是否成功
git config --get http.proxy
172.17.18.80:8080
# 取消代理
git config --global --unset http.proxy
git config --global --unset https.proxy
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有