Comments (2)
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.
Ok, I'll give that a try. Thanks for your feedback.
from posh-git.
Related Issues (20)
- Disable everything except tab completion HOT 3
- Antivirus flags AnsiUtils.ps1 for "reflective code loading"
- VSCode shell integration disables posh-git prompt HOT 2
- Powershell 7.3.0 does not show posh-git status bar HOT 7
- Set back to default
- Tab competition: tab vs right arrow HOT 5
- Bring back Get-GitBranch HOT 2
- Suggestion: Implement a PSReadLine completion provider
- git ls-remote won't prompt
- Posh Git Module Gets Blocked by Windows Action Guard HOT 7
- Prompt not appearing. Cmder/ConEmu, Windows 11 arm64 on M1 MacBook Pro under UTM. HOT 7
- Intellisense works on commands that don't exist
- Error when pushing to Bitbucket server HOT 2
- posh-git doesn't work with vscode integrated terminal HOT 5
- posh-git: The term 'posh-git' is not recognized as a name of a cmdlet, function, script file, or executable program. HOT 1
- Calling git on module import could be avoided HOT 2
- Tests break when run under the pwsh 7.3
- Importing posh-git shows empty prompt
- Request: Add -NoANSI option to all Write-commands
- Install fails while retrieving member "TryParse" as it violates the constraint of type 'T1' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from posh-git.