I want to merge two branches that have been separated for a while and wanted to know which files have been modified.
(我想合并两个已分开一段时间的分支,并想知道哪些文件已被修改。)
Came across this link: http://linux.yyz.us/git-howto.html which was quite useful.
(看到这个链接: http : //linux.yyz.us/git-howto.html这非常有用。)
The tools to compare branches I've come across are:
(比较我遇到的分支的工具是:)
-
git diff master..branch
-
git log master..branch
-
git shortlog master..branch
Was wondering if there's something like "git status master..branch" to only see those files that are different between the two branches.
(想知道是否有类似“git status master..branch”的东西只能看到两个分支之间不同的文件。)
Without creating a new tool, I think this is the closest you can get to do that now (which of course will show repeats if a file was modified more than once):
(在没有创建新工具的情况下,我认为这是您现在可以做到的最接近的工具(如果文件被多次修改,当然会显示重复):)
-
git diff master..branch | grep "^diff"
Was wondering if there's something I missed...
(想知道是否有我遗漏的东西......)
ask by johannix translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…