git version 1.7.3.5
我有以下分支:git branch
image
master
* video
我在办公室做了一些工作。当我回家后,我总是在家里的笔记本电脑上更新。
然而,当我执行 git remote show origin
命令时,会得到以下信息:
Local refs configured for 'git push':
image pushes to image (up to date)
master pushes to master (fast-forwardable)
video pushes to video (local out of date)
我对所有这些分支进行了git pull:
git pull origin image
git pull origin master
git pull origin video
当我在视频和图像分支上执行 git status 命令时,我得到以下输出:
nothing to commit (working directory clean)
当我在主分支上执行git status时,我会得到以下结果:
Your branch is ahead of 'origin/master' by 5 commits.
我不明白以下内容的含义 (fast-forwardable)
和 (local out of date)
?
但是在video的git状态中,它显示为最新的(up to date)?
如果我的master分支领先5个提交,我需要推送吗?
非常感谢任何建议。
git log --stat --pretty=format:'%Cred%h%Creset - %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative origin/master..master
命令可以让你了解差异。(fast-forwardable)
表示可以安全地推送:分支除了一个分支(在你的情况下是local
)有一些额外的提交之外,其他分支都有相同的提交。 - jfs