How can I see what files Git is going to push to the server in Xcode?

I have Git setup on an Xcode project and I make many small local commits before I push them to the server. However, I am not able to tell easily what all of the file changes are if I would do a git push. I know that you can look in the organizer and see all of your individual commits, but I can’t seem to find an aggregate view of these changes.

Essentially, if I commit changes locally to a file multiple times, I want to see the aggregate of those changes before I push the file to the server.

  • Make change to a git submodule, and keep the changes
  • Updating a submodule when multiple git accounts are configured
  • Git does not recognize repositories while executing a hook
  • git: patch does not apply
  • Moving master head to a branch
  • Can I get hg log to print the history in reverse order?
  • Does something like this exist in Xcode, or in some 3rd party tools for Xcode?

  • Changing “git status” output colors in Posh-Git
  • How to keep the GIT repos in sync
  • How can I find all the merges that had conflicts in a Git repository?
  • What happens after a Git clone is “done.”?
  • Git push to wrong branch
  • Is git pull --rebase safe if you are in a centralized model and never push force?
  • 4 Solutions collect form web for “How can I see what files Git is going to push to the server in Xcode?”

    Command Line

    git diff --name-only origin/master
    

    Will list the files that you have changed but not pushed.

    git diff origin/master directory_foo/file_bar.m
    

    Will list the line by line diff of all the un-pushed changes to directory_foo/file_bar.m.

    GUI Tool

    If your looking for GUI Tools for a Git workflow, I use Xcode to commit locally and SourceTree to push and pull. Before Xcode and SourceTree I was a diehard command line SCM person. But I really like committing locally with Xcode, it streamlined a multi-step process of reviewing the change diffs and committing very nicely. The more I’ve used SourceTree the more I like it and the less I use the command line. I’ve always liked Atlassian’s products and the $10 license for indies and small startups rocks. Now I just Love them to death for buying SourceTree and making free on the Mac App Store.

    enter image description here

    I think SourceTree does exactly what you want to do. On the tool bar the red 3 shows I have 3 commits to push. You just select master and origin/master to get an aggregate of what will be pushed. The bottom left pain shows the files changed and the right shows the aggregated diff for that file.

    FYI: Two awesome presentations on Git (Absolutely Must Watch)

    Git For Ages 4 And Up
    http://www.youtube.com/watch?v=1ffBJ4sVUb4

    Advanced Git
    http://vimeo.com/49444883

    You can tell the changes of your local repository vs your remote repository from the Terminal in your local repository directory by using the command

    git diff [local] [remote]
    

    for example:

    git diff master origin/master
    

    Use git show to retrieve the commits you made.

    Get the SHA identification of your commits and:

    git diff 0da94be..59ff30c
    

    Another option is:

    git diff origin/master
    

    The command above show the diff of the files to be pushed

    Source: https://stackoverflow.com/a/3637039/2387977

    I tried with Eclipse and found it very straight forward.

    Right click project, ‘Compare With’, ‘Branch, Tag or Reference’
    enter image description here
    Under ‘Remote Tracking’, select ‘origin/master’
    I got the full list of files modified.

    Git Baby is a git and github fan, let's start git clone.