Is there a command I can run to check if there is any commits to push to origin/master?
git [some command] origin master
Would output something like:
origin/master is behind by 7 commits
Here are two ways to list the "extra" commits you have which are not on origin/master:
git log --oneline origin/master..HEAD
git rev-list --oneline ^origin/master HEAD
The --oneline
just lists them in a shorter format. Also, if your branch tracks origin/master, a simple git status
will show you.
git diff --stat master origin/master
Example output:
classes/Mammoth/Article.php | 12 ++++++++++--
classes/Mammoth/Article/Admin/Section/Controller.php | 34 +++++++++++++++++-----------------
classes/Mammoth/Article/Filter.php | 14 +++++++-------
classes/Mammoth/Article/Section.php | 18 ++++++++++--------
classes/Mammoth/Article/Section/IMySQL.php | 2 +-
migrations/20130411111424_ChangeNameToURIOnSectionsTable.php | 14 --------------
migrations/sql/up/20130411111424_ChangeNameToURIOnSectionsTable.sql | 5 -----
solr-core/conf/schema.xml | 2 +-
views/admin/section/form.php | 8 ++++----
views/admin/section/view.php | 10 +++++-----
10 files changed, 55 insertions(+), 64 deletions(-)
If you're up-to-date with your fetching (something all the other answers here presume as well)
$ git checkout
Your branch is ahead of 'origin/master' by 9 commits.
(use "git push" to publish your local commits)
To get that info for all branches,
$ git branch -avvv
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With