for example i commit some files, next day some more files, and so on, after some days i want to view all my committed files, and view its difference with remote repo. Note i have not Push any thing. just want to verify that if i push some thing then will goes to remote repo.
+2
A:
The push
command has a -n
/--dry-run
option which will compute what needs to be pushed but not actually do it. Does that work for you?
Noufal Ibrahim
2010-10-19 10:38:51
A:
git diff HEAD origin/master
Where origin
is the remote repository and master
is the default branch where you will push. Also, do a git fetch
before the diff
so that you are not diffing against a stale origin/master.
P.S. I am also new to git, so in case the above is wrong, please rectify.
N 1.1
2010-10-19 13:26:56
A:
Assuming you're on local branch master
, which is tracking origin/master
:
git diff --stat origin/master..
bstpierre
2010-10-19 13:28:19