I am using git and gerrit. After changing my files, I do the following:
When I go git review: I get the following error message "No '.gitreview' file found in this repository. We don't know where your gerrit is. Please manually create a remote named gerrit and try again.
But when I do git push, I can see all my changes on the remote.i.e. the commit is made there. But I am not sure what's wrong.
Any thoughts or leads appreciated.
I already created gerrit when I was installing git/gerrit.
The gerrit command git review expects that you have a remote repository set up named gerrit. If you already have your repository as a remote named origin (the default from a git clone), you can rename it to what git review expects with this:
git remote rename origin gerrit
Before using git review you should configure the remote repository name. It's defaulted to gerrit. But you might want to change this default to origin as most repositories are called origin.
Simply call:
git config --global --add gitreview.remote origin
You might want to remove --global if it only applies for a single project.
This works for version 1.2.5 or newer.
For versions 1.2.4 or earlier add a gitreview config file: .config/git-review/git-review.conf
(Windows: %USERPROFILE%\.config\git-review\git-review.conf)
With this content:
[gerrit]
defaultremote = origin
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With