Comments (3)
I don't understand you question, you can put outputs.
PD: when you indent you text this is interpreted as source code
from git-prompt.
Sorry confuse you.
I am going through git-prompt.sh
where you define below:
/^# Changed but not updated:/,/^# [A-Z]/ {
s/^# Changed but not updated:/modified=modified;/p
s/^# modified: '"$file_regex"'/ [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p
s/^# unmerged: '"$file_regex"'/ [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p
}
/^# Changes not staged for commit:/,/^# [A-Z]/ {
s/^# Changes not staged for commit:/modified=modified;/p
s/^# modified: '"$file_regex"'/ [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p
s/^# unmerged: '"$file_regex"'/ [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p
}
I am confused to the difference between them, i.e. Changed but not updated:
and Changes not staged for commit:
.
If files are staged, you change it later, you'll see the prompt with git status
:
$ git status
# On branch master
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: README.mkd
#
no changes added to commit (use "git add" and/or "git commit -a")
I want to know where Changed but not updated:
come from as per git workflow.
from git-prompt.
1st - in index but not committed
2nd - file is modified but not staged
See also git manual.
from git-prompt.
Related Issues (16)
- Overriding PROMPT_COMMAND breaks autojump HOT 2
- Color issue with SHA1 hash on CentOS55 HOT 4
- MSys GIT support HOT 6
- Syntax error expression in bash-completion repo HOT 7
- Where is the hash ? HOT 5
- rxvt-unicode doesn't like long command lines HOT 1
- quote not properly escaped HOT 2
- git-prompt blocks the use of virtualenv's prompt decoration HOT 5
- Option for switching off exit code
- Incorrect link on the website HOT 1
- branch detection with new git HOT 1
- changed files from parent dir leaks into the prompt
- su support
- option for not showing screen's $WINDOW
- cd - HOT 2
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 git-prompt.