git server安装
gitblit為gitserver的安裝文件
客戶端除了要裝 TortoiseGit之外 還要安裝git bash
使用 intellij idea 和git 結合開發
首先先要安裝 gitblit (解壓就好) 配置參數
打開安裝目錄(xxx)下 xxx/data/default.properties
修改內容如下:
git.repositoriesFolder = D:/applications/git/gitrep(自定義創建的git服務器版本庫)
server.httpPort = 6666 配置git服務器開放的端口
再安裝目錄(xxx)下 xxx/gitblit.cmd? 雙擊運行? 看到started 。。運行成功
瀏覽器打開? ip:prot(6666)即可訪問? 用戶名密碼均是 admin
修改xxx/data/users.conf 可以增加修改刪除 用戶名密碼
以服務的方式運行 gitlit
編輯xxx/installService.cmd文件。
設置 ARCH:amd64(64位) x86(32位)
???? CD=D:\applications\git\gitblit-1.8.0? (gitblit的安裝目錄)
?? ?
修改為如下:
@REM Install Gitblit as a Windows service.
@REM gitblitw.exe (prunmgr.exe) is a GUI application for monitoring
@REM and configuring the Gitblit procrun service.
@REM
@REM By default this tool launches the service properties dialog
@REM but it also has some other very useful functionality.
@REM
@REM http://commons.apache.org/daemon/procrun.html
@REM arch = x86, amd64, or ia32
SET ARCH=amd64
SET CD=D:\applications\git\gitblit-1.8.0
@REM Be careful not to introduce trailing whitespace after the ^ characters.
@REM Use ; or # to separate values in the --StartParams parameter.
"%CD%\%ARCH%\gitblit.exe"? //IS//gitblit ^
?? ??? ? --DisplayName="gitblit" ^
?? ??? ? --Description="a pure Java Git solution" ^
?? ??? ? --Startup=auto ^
?? ??? ? --LogPath="%CD%\logs" ^
?? ??? ? --LogLevel=INFO ^
?? ??? ? --LogPrefix=gitblit ^
?? ??? ? --StdOutput=auto ^
?? ??? ? --StdError=auto ^
?? ??? ? --StartPath="%CD%" ^
?? ??? ? --StartClass=org.moxie.MxLauncher ^
?? ??? ? --StartMethod=main ^
?? ??? ? --StartParams="--storePassword;gitblit;--baseFolder;%CD%\data" ^
?? ??? ? --StartMode=jvm ^
?? ??? ? --StopPath="%CD%" ^
?? ??? ? --StopClass=org.moxie.MxLauncher ^
?? ??? ? --StopMethod=main ^
?? ??? ? --StopParams="--stop;--baseFolder;%CD%\data" ^
?? ??? ? --StopMode=jvm ^
?? ??? ? --Classpath="%CD%\gitblit.jar" ^
?? ??? ? --Jvm=auto ^
?? ??? ? --JvmMx=1024
?? ??? ?
?? ??? ?
?? ??? ?
雙擊安裝目錄(xxx)下的installService.cmd文件(以管理員身份運行)。
打開 ip:prot(6666) 登陸后創建版本庫 記下url
打開intellij idea 創建一個web項目 點擊vcs 創建本地git版本庫,等待web項目.idea/vcs.xml的出現,然后將web項目下的所有文件提交至本地版本庫
打開 git bash 命令行 進入web的根目錄下:
輸入命令,為本地web項目添加之前創建好的遠程倉庫(url)
git remote add origin master url
同步遠程倉庫的信息(輸入用戶名密碼)
git pull origin master --allow-unrelated-historis
推送web項目至遠程倉庫(輸入用戶名密碼)
git push -u origin master
此時即可使用intellij idea自帶的git進行操作
轉載于:https://www.cnblogs.com/gavinwu-blog/p/10088604.html
《新程序員》:云原生和全面數字化實踐50位技術專家共同創作,文字、視頻、音頻交互閱讀總結
以上是生活随笔為你收集整理的git server安装的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 比特币市场价格一直下跌,未来的市场价值归
- 下一篇: 【bzoj1029】【JSOI2007】