Giter Club home page Giter Club logo

Comments (2)

dahlbyk avatar dahlbyk commented on June 1, 2024

I need to write up some documentation on this, but roughly...

For branches that aren't configured to track a remote branch, you will only see the default branch color (cyan). For branches that are, the color depends on where the branch sits relative to the remote ref (as shown by git branch -v):

  • Default (cyan) = Local branch matches remote tracked branch
  • Behind (red) = Remote has commits that local branch doesn't - need to merge/rebase before push
  • Ahead (green) = Local branch is up-to-date and has commits that remote doesn't - can safely push

What I believe you're seeing is a common issue with git pull: the git pull <remote> <branch> form of the command doesn't actually update the <remote>/<branch> ref in your local repository. If you look at gitk --all or git log --oneline --decorate --graph --all before and after such a pull, you will notice the origin/master ref doesn't actually move, but your branch will have the new commits (either via merge or rebase). git remote update (or git fetch), on the other hand, do update the remote ref, thus fixing the prompt.

You should see the expected behavior if you use git pull or git pull <remote> instead.

from posh-git.

staxmanade avatar staxmanade commented on June 1, 2024

Ok, I'll give that a try. Thanks for your feedback.

from posh-git.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.