Your local branch doesn’t know about the remote branch. If you don’t tell git that your local branch (master) is supposed to compare itself to the remote counterpart (origin/master in this case); then git status
won’t tell you the difference between your branch and the remote one. So you should use:
git branch --set-upstream-to origin/master
or with the short option:
git branch -u origin/master
This options –set-upstream-to (or -u in short) was introduced in git 1.8.0.
Once you have set this option; git status
will show you something like:
# Your branch is ahead of 'origin/master' by 1 commit.
Related Posts:
- git error: failed to push some refs to remote
- Git error: “Please make sure you have the correct access rights and the repository exists”
- Untrack files from git temporarily
- Git, fatal: The remote end hung up unexpectedly
- Git – remote: Repository not found
- Pushing to Git returning Error Code 403 fatal: HTTP request failed
- Git master branch has no upstream branch
- How can I determine the URL that a local Git repository was originally cloned from?
- How to pull from one remote branch to another branch in git?
- Trying to git pull with error: cannot open .git/FETCH_HEAD: Permission denied
- How to git add a whole folder
- What does ‘git remote add upstream’ help achieve?
- How can I rollback a git repository to a specific commit?
- How to remove a directory from git repository?
- gpg failed to sign the data fatal: failed to write commit object
- Git pull origin
overwrites master? - Git merge with force overwrite
- Git Push ERROR: Repository not found
- How can I remove a commit on GitHub?
- Why does Git tell me “No such remote ‘origin'” when I try to push to origin?
- git returns http error 407 from proxy after CONNECT
- Git pull till a particular commit
- Does Git Add have a verbose switch
- Why does Git say my master branch is “already up to date” even though it is not?
- Git Clone – Repository not found
- git SSL certificate- Invalid certificate chain while accessing
- Git push existing repo to a new and different remote repo server?
- Differences between Commit, Commit and Push, Commit and Sync
- What is .gitignore exactly?
- How do I undo the most recent local commits in Git?
- GitHub – error: failed to push some refs to ‘[email protected]:myrepo.git’
- How to modify existing, unpushed commit messages?
- git – remote add origin vs remote set-url origin
- Git: Message ‘src refspec master does not match any’ when pushing commits in Git
- GitHub Error Message – Permission denied (publickey)
- Git : fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists
- Remove files from Git commit
- How to draw checkbox or tick mark in GitHub Markdown table?
- How to solve SSL certificate: self signed certificate when cloning repo from github?
- How to upload folders on GitHub
- How do I resolve git saying “Commit your changes or stash them before you can merge”?
- Pushing empty commits to remote
- fatal: The current branch master has no upstream branch
- How to fix HTTP 404 on Github Pages?
- Trying to git pull with error: cannot open .git/FETCH_HEAD: Permission denied
- How can I give access to a private GitHub repository?
- Can I share my private GitHub repository by link?
- There is no tracking information for the current branch
- Git push results in “Authentication Failed”
- Meaning of the GitHub message: push declined due to email privacy restrictions
- How do I create a folder in a GitHub repository?
- How to rename a directory/folder on GitHub website?
- How to undo git reset –soft to get my changes back?
- Download a single folder or directory from a GitHub repo
- How do I rename a repository on GitHub?
- What do raw.githubusercontent.com URLs represent?
- “Key is invalid” message on GitHub
- Git: Installing Git in PATH with GitHub client for Windows
- Why does ‘git commit’ not save my changes?
- Github “Updates were rejected because the remote contains work that you do not have locally.”
- My new Github page isn’t showing up
- How to add images to README.md on GitHub?
- Unity Collaborate vs GitHub
- “fatal: HttpRequestException encountered.” Error with GitHub/Bitbucket Repositories due to dropping TLS-1.0 support
- SourceTree keeps asking for Github password
- How do I set up Eclipse/EGit with GitHub?
- Create a new file in git bash
- Repository size limits for GitHub.com
- How to change the license for a project at Github?
- Git lfs – “this exceeds GitHub’s file size limit of 100.00 MB”
- fatal: could not read Username for ‘https://github.com’: No such file or directory
- Github Authentication Failed – … GitHub does not provide shell access
- How to update a branch with master on GitHub
- How do I pull files from remote without overwriting local files?
- git push origin master does not work
- Can I arrange repositories into folders on Github?
- How to discard local changes and pull latest from GitHub repository
- Could not create work tree dir ‘example.com’.: Permission denied
- ‘ssh’ is not recognized as an internal or external command
- Can you get the number of lines of code from a GitHub repository?
- How can I delete all Git branches which have been merged?
- Importing a GitHub project into Eclipse
- How to show math equations in general github’s markdown(not github’s blog)
- Git: Where exactly is the “working directory”?
- How do I run and compile this github project on my pc?
- Create empty branch on GitHub
- Import existing source code to GitHub
- GitHub .md files to WordPress pages
- How to handle a GitHub webhook POST request?
- Pull latest stable release via git [closed]
- Why doesn’t the “Press This” bookmarklet work on GitHub?
- What is the wordpress Git hub Repo master on beta?
- Post via git repository
- Is it bad practice to install WordPress by cloning from the official GitHub repo?
- Is it a good idea to make WordPress theme repository public?
- WordPress GitHub Workflow
- Git ignore everything except custom theme directory
- Sync Local site and Distant site
- Is it possible to checkout a beta version of WordPress via github?
- how can I create a WP offline environment before releasing the websites? [closed]