Browse Source

work-git: adding a note on pushInsteadOf way to go from http:// to git+ssh://

Yaroslav Halchenko 8 years ago
parent
commit
01874a0818
1 changed files with 10 additions and 0 deletions
  1. 10 0
      worg-git.org

+ 10 - 0
worg-git.org

@@ -57,6 +57,16 @@ If you want to contribute to Worg, keep reading.
 
      : ~$ git clone git+ssh://<UserName>@repo.or.cz/srv/git/Worg.git
 
+   If you already have your local clone of Worg obtained via http
+   protocol, you can easily tell your git to remain using http for
+   fetching and git+ssh for pushing, by adding to your ~/.gitconfig:
+
+     : [url "git+ssh://<UserName>@repo.or.cz/srv/git/"]
+     :   pushInsteadOf = http://repo.or.cz/r/
+
+   which could come handy later on for any project you clone from
+   http://repo.or.cz
+
 6. Go to the newly created =Worg/= directory and edit some files.
 
 7. If you created files, add them to the git index: