Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you know what changes are yet to be pushed?

Tags:

git

I checked out a branch, made changes, added changes and committed. I did not push the changes.

When I do a git status it tells me

Switched to branch 'develop'
Your branch is ahead of 'origin/develop' by 2 commits.
  (use "git push" to publish your local commits)

Is there a way one can know what changes (files/code) are waiting to be pushed ?

like image 619
happybuddha Avatar asked Dec 11 '25 00:12

happybuddha


1 Answers

git diff origin/develop will show the difference from your current branch to origin/develop.

git diff origin/develop develop will show the difference between origin/develop and develop branches when you are on any branch.

like image 141
1615903 Avatar answered Dec 12 '25 14:12

1615903



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!