How to tell if github repo ahead of my local git cloned repo

My work group has a github repo that is just documentation.
I clone that repo to have it local for off line work.
I do not change it or branch it. It gets updated but not branched.

What command do I use to

  • I can't see my project in gitweb. How do you configure gitweb properly?
  • Visualize branches on GitHub
  • Git ignore file for Xcode 4 projects
  • Find a Git branch containing changes to a given file
  • How to update file write permission in Git
  • Redmine - Git push fails hook declined
    1. tell if the work group repo on github has been modified
    2. pull just the changes to my local machine?

  • Is there a way to make git remember the password for WebDAV remotes?
  • How should I stage my bitbucket + heroku django app for development and deployment?
  • What's the best CRLF (carriage return, line feed) handling strategy with Git?
  • Does git remove files from version control after they are added to .gitignore?
  • GIT rebase requires to recommit changes
  • How to find last git commit before a merge
  • 3 Solutions collect form web for “How to tell if github repo ahead of my local git cloned repo”

    If you want to find out if there are differences between your local branch and the remote branch run a diff command

    # display changes between local branch to remote
    git diff master origin/master

    To update all the content of your repository use the fetch command

    # Fetch all changes from the remote 
    git fetch --all --prune

    To merge the changes into your branch use the git pull

    # merge the changes from the remote to my branch
    # git pull is a combination of 2 commands. fetch + merge
    # so this single command will fetch (bring) and add (merge) the changes
    # made on the remote branch into your branch
    git pull origin master

    You can use:

    git fetch
    git status

    to check if there are some updates of your remote repository. Git status will notify you if your repository is behind the remote repository. If you want to get that changes you have to use this command:

    git pull

    Note: git fetch download only the changes made to the remote repository; git status show to you in which phase the files of your local repository are (unregistered, unmodified, modified or staged) and show if there are some differences with the remote repository; git pull is similar to a shortcut to these command:

    git fetch
    git merge

    i.e. it will download remote repository changes and then updates your local file (it will do a fast-forward update if you don’t modify your local files).

    More information about Git can be read here:

    I hope this could help you.

    1. To tell if the remote repo has been modified do the following:

      git fetch

      git status

    The fetch command fetches information about the remote repo, but it does not update your local working files. The status command will tell you if the remote branch is X commits ahead of your local branch.

    1. To pull the changes to the local machine:

      git pull

    Git will automatically only grab changes. The pull command fetches those changes – as in the answer to number 1 – and also merge those changes into to your local files, so you’ll actually “see” the changes.

    Git Baby is a git and github fan, let's start git clone.