Showing repo status via directory color
I would like Project1 and Project2 to be colored based on their git status when you run ls from the Code directory.
How can I make that happen?
One Solution collect form web for “Showing repo status via directory color”
You can try some zsh git theme like this one, which changes the directory color to reflect a dirty status:
Another alternative is to keep the status color separate from the directory itself: see this zsh theme (from Josh Dick)to shows a “traffic light” representation of git status:
- Red (●) means there are untracked changes.
- Yellow (●) means there are unstaged changes.
- Green (●) means there are staged changes.