Does git run "fetch" automatically, or only when I tell it to? -
i'm using git in bash, , have 1 of fancy bash prompts gives me repository information without having type git status
. tells me branch i'm on, how many modified , untracked files, and, relevant question, how far ahead/behind remote am.
recently i've begun notice strange: when press enter , new prompt appears, tells me i'm few commits behind master. and, in fact, am, "git status" confirms it. question is: how know? @ no point did run git fetch
or git pull
or other command talk remote , find out how far/behind local checkout was. in fact, i've seen happen i'm haven't run git commands in between, except git status -z --porcelain
bash prompt script runs generate prompt.
it's freaking me out bit. mean, information helpful, idea of running git commands on repository without me knowing bit unsettling. here questions:
does git kind of thing? run fetches automatically in background result of running other command? obviously, push/pull needs run fetch execute, i'm talking "local" commands
git status
,git add
,git commit
,git diff
, etc.is there kind of "command log" in git, can audit operations run, when, , whom?
- nope, not
- not know of. can set environment variable
git_trace
, git tells commands internally calls.
Comments
Post a Comment