Comparing remote Git branches

I'm comparing remote branches, in order to see if a branch can safely be merged into Master, in order for Master to be released.

I'm doing the following:

git diff --name-status origin/develbranch ... origin/master

And I seem to get a correct list of files, like this:

AAAA    www/images/widget/topdown/right_dis.png
DDDD    www/includes/htmlpurifier/library/HTMLPurifier/DefinitionCache/Decorator.php

My questions are:

  1. Am I doing this correctly?
  2. If I merge these branches, the DDDD file won't be deleted in Master right?


Actually, to get the diff the right way around you want to run

git diff --name-status origin/master ... origin/develbranch

That should work fine, but I'll show you some other nifty tricks:

  1. git checkout master; git branch --no-merged

    This will show all branches that aren't fast-forwardable to master, i.e. all non-merged branches.

  2. git checkout master; git merge --no-ff --no-commit develbranch; git diff

    This is the only way of knowing what the merge would actually look like. You can throw away the merge after you've looked at it with git reset --hard .

  3. git branch --contains develbranch

    Will show all the branches that develbranch could be fast-forwarded to. This is useful for checking which branches all the changes of develbranch have been merged to.

Need Your Help

Place git repository on external hard drive

xcode git version-control xcode6

I am using XCODE, and have recently decided to try using git (I am a lone app developer, so never really needed to use it). Because it used to take up a lot of storage space when I tried it previou...

Shuffle instruction in CUDA not working

c++ multithreading cuda shuffle

I have got problem with shuffle instruction in CUDA 5.0.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.