gerrit - Can't run any git commands in $GERRIT_SITE/git folder -


i have gerrit installed.

when project created through gerrit web ui, project reflected in $gerrit_site/git folder.

for instance if project trial created on gerrit, trial.git folder created in $gerrit_site/git folder.

but when try run git commands in $gerrit_site/git/trial.git folder such follows, following error:

$ git status fatal: operation must run in work tree 

i not know how go , need guidance.

the reason find on disk bare repository, without working tree (i.e. files of particular branch). totally normal git server , find same inside .git/ directory once cloned repository.

edit can work on server side these bare repos, when specify repo's path argument git_dir environment variable:

git_dir=/var/gerrit/review/git/trial.git/ git log --quiet --pretty=medium 

this esp. helpful when using gerrit hooks something, when new change merged etc.


Comments

Popular posts from this blog

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -