I\'m a little new to Git, and I\'m hoping somebody can explain what this message means exactly, in my scenario.
To give you some background information, this is what I\'
It's possible that you only pushed the master branch but not your new branch. You can do this with:
git push -u origin <branch>
So you have cloned, created a new branch, made some changes and committed them to your branch. I assume you have used
git push -u origin <your_branch_name>
Since you have made a new commit to your branch, it says 'your branch is ahead of master by 1 commit'.
Since you have committed the changes and pushed it to remote, you cannot view the differences in the files using git diff
and cannot view your modified files using git status
, since they are not in the staging area anymore.
This means that you have committed changes to the repository local to your machine. Those commits do not exist in the repository that you have cloned from. That message is a reminder that your repository has things in it that do not exist anywhere else.
To make git "happy" you need to push your changes somewhere (usually from where you cloned from)
run git push origin master
to resolve.
Looks like you have set the current branch's remote tracking branch to origin/master
and you have something in the branch which is not there in the origin/master
branch.
You can verify the remote tracking branch by running,
git branch -vv
Once done, you can check the commits which are not in the remote branch by,
git cherry -v origin/master
Or if you want to see the difference, just run,
git diff origin/master