This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
developer:getting_started:windows [2015/10/29 21:34] Bryan Sullivan |
developer:getting_started:windows [2016/01/07 16:43] (current) Mark D. Gray |
||
---|---|---|---|
Line 10: | Line 10: | ||
===== Using Git for Windows ===== | ===== Using Git for Windows ===== | ||
- | This procedure may be terse, but will be clarified as needed and will be re-tested to make sure nothing is missing (steps that I took to get this working may have been forgotten in fumbling toward a solution...). | + | This procedure will be clarified as needed and will be re-tested to make sure nothing is missing, superfluous, or redundant. Any input is appreciated. |
* Install Putty (the ZIP file or installer package) from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html | * Install Putty (the ZIP file or installer package) from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html | ||
Line 17: | Line 17: | ||
* Assuming you have already created a gerrit account for the project/org, add your public key to the account through the gerrit UI, e.g. https://gerrit.opnfv.org/gerrit/#/settings/ssh-keys | * Assuming you have already created a gerrit account for the project/org, add your public key to the account through the gerrit UI, e.g. https://gerrit.opnfv.org/gerrit/#/settings/ssh-keys | ||
* Install Git for Windows from http://www.git-scm.com/downloads | * Install Git for Windows from http://www.git-scm.com/downloads | ||
- | * Select option "use Plink for SSH". | ||
* Run Git Bash. Further commands below are run in the git bash shell. | * Run Git Bash. Further commands below are run in the git bash shell. | ||
* Create/edit your .bashrc file using vi or your editor. .bashrc sets up your bash environment when you run Git Bash | * Create/edit your .bashrc file using vi or your editor. .bashrc sets up your bash environment when you run Git Bash | ||
Line 48: | Line 47: | ||
[user] | [user] | ||
name = (your gerrit ID) | name = (your gerrit ID) | ||
- | email = *(your email) | + | email = (your email) |
</code> | </code> | ||
* If you are behind a corporate or other proxy, set the proxy in the git config | * If you are behind a corporate or other proxy, set the proxy in the git config | ||
<code> | <code> | ||
- | git config --global http.proxy =(your proxy, e.g. http://proxy.example.com:8080) | + | git config --global http.proxy (your proxy, e.g. http://proxy.example.com:8080) |
</code> | </code> | ||
* If you want to turn off the proxy (e.g. to use git outside your corporate network), edit the .gitconfig file and comment out the proxy line | * If you want to turn off the proxy (e.g. to use git outside your corporate network), edit the .gitconfig file and comment out the proxy line | ||
Line 68: | Line 67: | ||
scp -p -P 29418 (your gerrit ID)@(your gerrit server domain, e.g. gerrit.example.com):hooks/commit-msg .git/hooks/ | scp -p -P 29418 (your gerrit ID)@(your gerrit server domain, e.g. gerrit.example.com):hooks/commit-msg .git/hooks/ | ||
</code> | </code> | ||
+ | * If you do not have ssh access you can also get this via http | ||
+ | <code> | ||
+ | curl -Lo .git/hooks/commit-msg gerrit.opnfv.org/gerrit/tools/hooks/commit-msg | ||
+ | chmod +x .git/hooks/commit-msg</code> | ||
* Install Python (3.5 or greater) per the "Windows" section of https://www.mediawiki.org/wiki/Gerrit/git-review | * Install Python (3.5 or greater) per the "Windows" section of https://www.mediawiki.org/wiki/Gerrit/git-review | ||
* Select "Add to Path" option | * Select "Add to Path" option | ||
Line 85: | Line 88: | ||
git review -s | git review -s | ||
</code> | </code> | ||
- | | + | * If git review hangs, you might fix this by uninstalling and re-installing git (not sure why this helps, but it did at least once) |
===== Creating a Commit and Gerrit Review ===== | ===== Creating a Commit and Gerrit Review ===== | ||