on one branch,pull and graph another branch

本文介绍如何在Git中从当前分支拉取另一个分支的更新,而无需切换分支,以及如何查看非当前分支的日志。通过使用'git fetch'命令与特定语法,可以在不改变当前工作目录的情况下更新指定分支。同时,'git log'命令可以用于展示指定分支的提交历史。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://superuser.com/questions/163033/pull-for-another-git-branch-without-switching
https://stackoverflow.com/questions/31368434/how-can-i-print-the-log-for-a-branch-other-than-the-current-one

say, we are on the condor branch and want to pull master branch, we could do like:

git fetch origin master:master

and we could graph the master branch as well:

git log master --graph
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值