git command equivalent to p4 sync -n

Viewed 76

Before I pull from a remote repository I would like to size up the changes. Not completely sure what information is available. A list of commits (with descriptions) and a list of files changed is a good place to start.

For anybody familiar with perforce, I want the exact equivant to "p4 sync -n".

I thought this would be easy. I first checked "git help pull". I then checked google. Run out of places to check.

1 Answers

There is no direct equivalence for p4 sync -n in Git.

A list of commits (with descriptions) and a list of files changed is a good place to start.

That would still involve a git fetch first.
Then, as commented:

git diff --name-only @ @{u}
git log --pretty=oneline @{u}..HEAD

As illustrated in "How to compare a local Git branch with its remote branch", @{u} from git revisions

The suffix @{upstream} to a branchname (short form <branchname>@{u}) refers to the branch that the branch specified by branchname is set to build on top of (configured with branch.<name>.remote and branch.<name>.merge).

Related