GIT在存储库中进行分支修订 [英] GIT Branch revision in repository
问题描述
我们如何知道本地主人是否在远程主服务器的后面,不需要拉出或取出。
我的意思是在拉取或取出之前,我想确定如果我的本地主服务器在后台主服务器后面,以便我可以执行读取/重新绑定/合并(如果它位于后面)
没办法我知道。如果你抓取,你不必立即重新绑定,然后git status会告诉你,如果你在前面或后面(或两者)。你必须做某种远程查询才能获得你想要的信息 - 而获取就是那个查询。
How can we know if the local master is behind remote master in repo with out pulling or fetching.
I mean before pulling or fetching, I would like to determine if my local master is behind repo master so that I can perform fetch / rebase / merge if it is behind
No way that I know of. If you fetch, you don't have to rebase immediately and then "git status" will tell you if you're ahead or behind (or both). You'd have to do some kind of "remote query" to get the information you want - and fetch is that query.
这篇关于GIT在存储库中进行分支修订的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!