Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Git not telling me that I am ahead of my remote

Tags:

git

In order to synchronize my repositories with Wuala I created a new bare repository (which is synced). I added this one as a remote to my existing (local) repo.

Now I realized that git status should also tell me when I am ahead of my remote, but it isnt!

C:\Users\blubb\Git Lokal\myproject>git remote -v
wuala   file:///C:\Users\blubb\Git\myproject-remote (fetch)
wuala   file:///C:\Users\blubb\Git\myproject-remote (push)

Currently I know that my lokal repo is ahead of the remote (local changes are commited), but that's the status I am getting.

C:\Users\blubb\Git Lokal\myproject>git status
# On branch master
nothing to commit (working directory clean)

I am able to push my changes but it would be nice to see how many commits I am ahead to do a proper rebase squash before.

like image 590
lostiniceland Avatar asked Jan 18 '23 05:01

lostiniceland


1 Answers

Your branch may not be set up to track the remote. Try this:

git branch --set-upstream master wuala/master

And then see what git status says.

like image 117
Amber Avatar answered Jan 27 '23 07:01

Amber