4 ms·
The truth is both are blazing fast, but at least on my machine git status is a hair faster: $ mkdir baz $ cd baz $ time git init Initialized em
by tsm 12y ago
The truth is both are blazing fast, but at least on my machine git status is a hair faster:
$ mkdir baz
$ cd baz
$ time git init
Initialized empty Git repository in ~/src/tmp/baz/.git/
real 0m0.015s
user 0m0.002s
sys 0m0.008s
$ time git status
# On branch master
#
# Initial commit
#
nothing to commit (create/copy files and use "git add" to track)
real 0m0.012s
user 0m0.002s
sys 0m0.003s
- joelg236 12y agoInterestingly, for me git init took 0.045s, while status took 0.005s. I wonder what factors into this.
- TimWolla 12y agoFor an existing repository: Size of the repository, as well as the number of files in the folder. A single git status on a 1.7GB git repository takes about 9 seconds with a warm disk cache on my workstation.