What does * alongside a branch name in VS-code mean?
Asked Answered
F

3

29

I am unable to know why is there a * beside my git branch name in Visual studio code. Is there something I should be wary about?

Fijian answered 20/3, 2020 at 4:39 Comment(0)
C
19

Most shell colorisation plugins and IDEs typically use * for branch names denote that the current branch has files that have been modified, or sometimes only denote that the local repositories have files that were created, but not added to the "index" in git, which means those files haven't been git add-ed. This is just a convention, and not a rule.

Screenshot of my shell with theme Pure

Coshow answered 20/3, 2020 at 5:13 Comment(0)
P
7

This can also mean that you have a git stash. You can get this sometimes when you make changes on a branch and then switch branches. A lot of ide's don't carry the changes over so they save them to that branch. To get the changes back you can run

git stash pop 

or to just delete them you can do

git stash drop
Patterson answered 9/11, 2021 at 16:19 Comment(0)
W
1

It means that you have changes in your parent branch. that means you have to 'git stash' and go back to your parent branch and get a 'git pull' and come to your branch and again 'git pull' from your parent branch. till here your branch is updated with your parent branch. and now you can get back your changes by 'git stash pop || apply'

Washington answered 28/3, 2022 at 5:8 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.