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.

  • What does HEAD point to?
  • Gitweb not displaying some repos
  • Jenkins path to git Windows master / Linux slave
  • Re-point git HEAD to master branch
  • In a Git cherry-pick or rebase merge conflict, how are BASE (aka “the ancestor”), LOCAL, and REMOTE determined?
  • Git Credential Management - allow to change passwords (Windows, TortoiseGit)
  • Does something like this exist in Xcode, or in some 3rd party tools for Xcode?

  • Error “Failed connect to github.com”
  • Having issue while implementing custom gitlab hook
  • How can I diff between HEAD and the n-th last revision that changed a file?
  • Git: Combining git-flow with forking workflow?
  • Testing incoming pull requests using sourcetree
  • Merge two similar remote git repos into one
  • 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.