版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Gitlab使用手册1. 注册用户1.1注册用户打开浏览器输入gitlab服务器地址,注册用户,如下图GitLab社区版 川:円势fl旳却離枕APh*tf*.? B+fqlftUitfA-Y # 1 111 H*jK*GitLab哄miw亍一咲横砲用酹归刊硝艇仙认曲主1.2初始化ssh密钥并配置到账户M iNG/J&ii/c/U ers/Admini strato rAdmi ni st r a+orPC- 2 0171211 mQ 4164 S git conf-i g 亠亠勺 1 心bT user .name P,dw5111Admini strator(&PC-2017121_lang1
2、63. coffl-Generatinq public/pr i vate rsa key pai r.EntEr fi 1 e i n which ta save the key (/匚/Users/Adnn nf strator/呂h/_id_raO ; Enter passphrase empy for nc passphr己ee:Enter same passphra again:aur identification has been saved in /c/Users/Admini stratorf.ssh/icLrsa. Your publi 匸 key been saved in
3、 /c/User s/Adn1 ni str at r/d-fsm. oub. The key fi ngerprint 5 :SKA256:6clgSrr3XZxOjtQUaqqxCKVsfilgUEoLj7Q4urYHqqspconThe: ky * s randamart image i s :*RSA 2tM8+Im. Ii. *iiio| *.E QI| XOt -i FQ| &X=+ dIE5=.c.b.I十一一 5HA25 5十到系统用户目录下找到.ssh文件夹下复制id_rsa.pub文件的内容直母世禹也:LAHWR3:tiX审二肓开忿仃3B百N宇二it4幻旺 JUDgwid
4、i*2317/12/191L23 責炸2 KBidLii-ajMb !Z31? 1J/19 LL21Stt?1 *CB配置gitlab的ssh密钥ISH Sift斤蜀;:-103 .em自窪珂 m: 211LjuN/A密钩KiJDWHtfi、H赛月西丁眇倉川加L-1 Lr虔3注盯口:; 密過二俑醫勇 J芒褪*熱議fiSaJh-a.-.-zj匸.一:4S-?-1 上 U :乞丄-了-, 7 :工.: .; I - :. I I :. . - :lL .1 - -1: !- I ::!J:-!-?.: J. -:: . ! I -?.: /.:?, :眦角n5#1 沁|S&! phW总型!aFQT
5、IWEJhX话应UC SwiJMEBOTQ 飙可 ndJEXtlL苗號 1屿M IMjl&LhC hlUGT 血斗JGffiGN H I I - ; : 、 I * r _- i-. - / - F T I ., =: png jlbTriTiMiipng lEB.rcinihfE)朋5SH醉iMStrlRJvTTMEisfe i i=i 1 bd: :_ f : 17! j f : 61!-J! 6.! h : ! d j ! bb * i &s *. fl: 5f: H轩h Hd 出紀期订期址】尸網|!刑|#)0甲3小lWLo5RwTnfiTdv声twariUiMolHiblflOLW皿
6、yrngl 阳 口初稠十应口尸强 og j gutf兀iutmH pzvj qqc P0IDa5EiVJgQlknLbKz9qdWF6TZM|IW5WPIKCFiitFED1i,dZlMVMrPnwV75C4Li!rtT5QEyW XHvdHRxhrg r *qi MEJyzac ircswi磁日条 t sbrz. tkjflcir kJ* Ji 朽穴 ikp6icb i t_n au&u 尊ograQl,网1 epLVld咖QTLLWHtnniX叫电讯冲5旳洌叶|AMUn耳咖打Tni于兀口bdl wtlp 盘*iFKRtf * *龍 R Fl丸T *! I qr lvM - giTiHLdL
7、ft-|!-:iixriti 啊ifWKiM.l-rL ifi wrlh?.ii- Sil.* flfci -fe l ” 13 H1I- - j T 42.2添加用户到指定的组给项目添加用户(所有者,主程序员,开发人员等);输馆曲韵UpOf|Z !=!ftfririP 弍.IW1W 昂IHHlH “词 WiMpfrwHip FiW 斗护 MMlhiMinB4- J IPS3QAIW miw険酣训声*l|Q日頭科州FMh川程用舸砂击EltMfl.eilft 611335 l fc ?创沪茅Ele专在eiML4*.ThraypKW3扌悴己丽申宦月宜看耳和切TTIf1Wti|,自載吟衬兴皿p引也呻
8、钿旧 O* IUMWr 订皿 FfJ 加?时刮 0 r nyfe sgr:-fewW MlirihMdfi _ 訐 |J運悔 tn/时良1 H5也:R 2 nwnyte林iWjS商理了ff事去干曲邑讦刪ROH比日环冋n汙料旨织 弋目的旳可m.i二刍二鱼如匸& rtff匚 M 片辱_1囲坤日則2.3新建项目新建项目时根据需求选择可见等级( Privatenternal,Public)M点Wsi宴目期目IKMtp-. a142 6S-5J$*i, dewrtpGran?毎件科的咬目利置干同一 1、缺空冋下爭M碎看Coch皿 V ixuLirf 如G 琢于匚2*f3毋Me 3卢島它准|舸妙皿會 并出
9、朝畑M鄆JI畑BW刑* A齢y由ffc1: w fHUI 軒歹啊陰E tiicHiylq* pen Ud产V lr 段 wTtnt pspwt nw bt anctracd B y 口口陣旳 n lhrtQ :ubi :f*w pnE cs be froeswd wthirut EjrjMfheTKBhpi,蝕廿目3. 命令行上传本地代码3.1添加git忽略文件添加.gitignore文件到项目根目录,文件内容如下:#eclipse忽略文件/.sett in gs/target/.ject.DS_Store.gitignore3.2初始化本地git版本库进入本地项目文
10、件夹,执行命令git init5 git initIrtiti alised empty Gi t repository in Dj/eelipeeworkspace/twtPrejert/_git/3.3关联本地项目到远程 gitlab库1 git remote add origin16E. 5. 254 :developGroup/testProject. 口彳十3.4添加所有文件到git暂存区S git add .3.5提交到git本地仓库$ git coimit -m 初姥此项昌master Cr&ot-cafmi t) dlaaf dGj 初始化取曰4 files changed &
11、1 insertionsrzj./testProject/Ap口Test. jav且3.6推送(push)到远程gitlab库$ git push * origin masterrhe authenticity nf host 5斗 CLO2.2L跖5254),cant be established. ECDSA key fingerprint 15 SHA256:ElGe6nO3M&9VqC3in5 12/SOXIH4oCbGtpvPBSFdGZs.A.re you sure you wan to 匚anil nue canneci ng yes/no)? yes.Wa
12、rning: Permanently added 192.LG8.5-2S4* (CCDSA) to the 11st of Icnown hosts. Counting objects: 17, don&.Delta 匚oinpression U5ing up to 4 threads- Cumpres&ing objutts;(7/7)t don.Writing objects: 1(XJ (17/17j , 1.59 KSE | 541.00 KSB/s, done.Total 17 (delta 0儿 reused 0 (delta CJJ! 192.1&8 5.254:develop
13、Gr oup/test Proj ect.git* new branchmaster - mast erBranch master、亡t up to track remote branch master from origin上传本地项目成功,如下图甲 Fc-rktest Project a5SH g 11 ? 152.1ES. S. 2 54 :dSv-?l u2 Gro up0JL + j|l Global 壬Q Fincl ijlr 比找百丹 iX pdlLielidfrI 更?Itv tcstPrpfcd +Last Upda-e七* wushaolir cdi n J irinir
14、ijoMan#Last com m m mVflsiV-Q2 乎:iqzra碉1苗鬥P coot. - ml吨L目4. 使用Eclipse上传本地代码4.1Eclipse上安装EGit插件方法一:Help - In stall New SoftwareH&rvTHQpvOe-d4 sd=o山八d-工tL-0%8- p-s.-ntw Ou- -4-s.iEUIJP 3 J El-rl JjQBuaHA 芝幺口4 -PI*=% 宦 uf LuIJLP.-NU上 uc_sslipse MarketplaceSelect s&lutiQins tc ;cstalL Press Install Nov*
15、 to proceed with inI loti cm,Pmit th* mor# info fink to I earn mcr# about i solution.-Ec ipse Mrketp acR¢PopiuhrJnctal $d Eclipse N#vrc 9ttr: CapeNa MBE soluli.S?ardhFind: Eg itConsole 13All MarketsAlli Uateg criesGcnsole is a Git console for ne Edlipse DE Gt commancls can be Entered direrty irt
16、o the Ec ipse Console VIcvm and display th&ir output witfiiin this vie4/. morg infoby cdeaH ne-. EPlln$UIIEGit - Git Integration for EdipM 4*6jOEGit k tine Git intsgrstiDn for Zclipse Git is a disributeT verzipning Eystem, which developer ha s fuH copy of all history of every revision of,. HflOFg in
17、foby Eli屮EPLegjt igil git 響肖 gern 竺means72111Ingalls: 4SSK i.L,2E9 ha montfijGitflow NightlyGitflowNighty hji d of the GrtfUow in*egrprhnn for Frlips-p EGitiiiibyPL亡git git vy口 kfl口谢 壮e disinbit右詁 耳ersion coritiTCjlInstalls: 5JL6K i2bo last month Iinstalil4.2初始化本地git版本库注意:添加.gitignore文件到项目根目录-l_i Pr
18、oject Explorer l亠 Navigate r 1:*丨1=釦2_| A p c .j an/a 1 iMNev*Go Tn toOpn ir Wirdow*凸亡打口scPri吕lll_w b- $CopyPtasteDeleteMove.Rename-.ImporiL.Export.-RefreshClcsr PrcjrctClme UrrrUfrd Pr口5how iin -Reinat: Systems viewValidateCo/dragD AebRun AskDebihg AsikProfile AsbRestore from. Lol Hirtery.Meven*Tem
19、Cornprc WrtlrcSourcebSprirg Toot卜Prc pc risesRrftOvi hc?in Qo直FiiTCti1+Ahl+Shift-Drnpaickage conii.xrz 已匸已Ppublic clfiss Apppublic static void nnaiSyitem-wt ,p intln Shw# Project. eclipsePrj eclipsePrj NO-HEADD 爲-gitO D .settings* src Q a main鸟 javaJ 2?* com鸟 xrzj R eclipsePrj|J? App.java卜口test0 G?
20、targetK classpathE?gitignorex projectg pom.xml4.3添加项目到git暂存区丿 eclipsePg eclipsePrj2 NO-HEAD / settingsJ 活 &rc/ main-* 6 java4 com ft血*、n frclipsePrj2 Jj App.javaA Lqg tcst.场 target脣.classpath电,.project也 pom.xrrill4.4提交到git本地仓库二一 Prqjrct Lplorer I- havigatcir 丈0 App.jaJ 氐a ecliipsff-Prj ipwPri ruCl-H
21、lFiril卜门匚qfwh礼Cirl+EStachtcOpen ih INw WindowPuih ta Upial/vdiniF叱 h from UpU伽 fiPus B-arch.PulPdteMove.RemoteiR.h 甘 me“.Switch I- n test z : torgel|N| .classipalFi .ghignare 卜.project 囱 pem jcml j 占 tmPrajerl SFttirggAdvflnrrdImpcid.Eifportt*-n afreshClo皆 PmpjffttCb$e Unrdotod rajecteSyr diranize A
22、orkpaceMerge TodMergt*.,.八IHtiirgffigigmore |J4 projecth pciiijornlSh&. in Refliot-e SlerTs vivValid-3 teCovfrr9* AsRun A&Apply Patch h*Ade: to lr mDebug &IqrcreRestore frEwn LduI History-.nvmlio in HikoryShcM iin RepcsiljDrieiTpflmDiwonnffii定要添加备注,如下图:HMn 亡暉.4 pc4* - R.hTHB7: renwi1 * |*提交成功如下图:j 匸
23、丄 etlip&Pij eclipePij master 闵-git. settings*备皿J main-占 javsj 乌 com為JtrzjJ , i edipePrj 囚 AppjavaJ t5t* 占 javaJ G mJ d edipsePrjAppTestJdVd4.5推送(push)到远程gitlab库二 Prqed: Liplcrer - Wy再忒b ;d * IT T-. fipw Prj lie( p*/ * 4 .H-itingt. 5IXd r 片 cani巴血财 |Xi 啊昭HhL1- Bp*igfB 旦.prcjeei . pcmjml 4 EM忖 |a 启氐 E
24、l%th-.J5*ignr:re低.p对胡Htw5 bi%O =en 祜 New iAndcwCW5PavfepDaW.MCwfl_Import.Expett.Clow 阳Clow UnreLited Ptciwcts笛w i Rertr Syaterrt 応 idabe-匚 zm*科亡Aj;Run AfLeUxig Asfim-TOf?城币 Local 村!w*yIf Amf ffijmfifiw Wrh片 Afhp.jmrf屮加4“ 曲 WNh Tfli $ RjM T辱庐LdvaiKAd* Fflkdi Rwl.餐 SndvQnKK WM2EPI-Cf CflHicmrp r注意:使用s
25、sh上传不用输入密码,如下图(相当于git remote add origingit54:developGroup/eclipsePrj.git ) Push to: ssh:/git54/developGroup/eclipsePrj.gitPort:Destination Git RepositoryEnter the location of the destination repository.LocationURI:ssh:git1921685254/developGroup/testPfjgitLocal File.旦 ost:192.16
26、8.5.254Repository path: developGroup/testPrj.gitConn ectionProtocol:FinishCancelPush Ref Specifications Select refs to push.Add create/update specificationSource ref:Destination ref:V1Imaster branchAdd SpecRemote ref to delete:Add SpecAdd Configured Push SpecsAdd All Branches SpecAdd All Tags SpecSp
27、ecifications for pushForce Update All SpecsRemove All SpecsAdd predefined specificationFinishCancelSB Push to: ssh:/git54/developGroup/eclipsePtj.git j 回Add thisPush Ref SpecificationsSelect refs to pushrefs/h ead s/m a ste rrefs/h ead s/m a ste r4? Add SpecDestination ref:Add delete ref
28、specificationAdd create/update specificationSource ref:Add SpecRemote ref to delete:*Add Configured Push SpecsAdd All Branches SpecAdd All Tags SpecSpecifications for pushForce Update All SpecsRemove All SpecsFinishCancelAdd predefined specificationPush Ref SpecificationsSelect refs to pushAdd creat
29、e/update specificationSou rce ref:Destination ref: *Add SpecAdd delete ref specificationRemote ref to delete;*)C Add SpecAdd predefined specificationAdd Configured Push SpecsAdd All Branches SpecAdd All Tags SpecSpecifications for pushMode Source RefDestination RefForce Update Remove& JUpdaterefs/ih
30、eads/masters/masterZZj 0FinishCancelForce Update All Specs x Remove All SpecsRepository ssh:/git54/developGroup/eclipsePrj.git Can cel push if result would be different than above because of changes on remote 門 Show dialog with result only when it is different from the confirmed result ab
31、oveFinishCancel* -io Q*UwJa1g sQ? 3J m moqt* yseeou=oEnlv rr養 p* 6 卫此匚主ppm s- s.- XUECm _ o- -E LBMjnu3k.-_ui0ralscl-Gtt-rlII:兰-: ,-L”-t:Kb?-.,.-fFr-刺Trr + 阳直 -血Vr-lcdwmaTp 心益OLWaoTaA山 prt?srq5 oa9T &61 、+工 5 mQ4TLH灯 dmxl.-=E4占OJbESSlJ运+:巳匸唏“吕一 sadnojgdow孟 p/trsG 器11:5/、盟 弔喂足40daspdnclpduuAap、sEunj9
32、IE6-回土B上挨 m土 zsnd 觀5. Eclipse 插件EGit的使用5.1添加m2e-git插件5.2从gitlab检出项目圏 ImportSelectCheck out Maven Projects from 女MSelect an import vizard:type filter textL Java EE Utility JarRAR filej Maven口 Check out Maven Projects from SCMExisting Maven P rqj ectsIntall or deploy an artifact to a Maven repository
33、亠 Materialize Maven Projects from SCM0 & OonnphPlug-in DevelcpmerrtRemote Systems( A RunTDcbugj Q? Taksu * ll n : 1 =a 丄 :. .l. v BackCancelCheck out as Maven project from SCMTarget LocationSelect target location and revisionSCM URL git !t 54:developGroup/test 7j Check out 旦ead RevisionRe
34、vision:V Check out All Projects b AdvancedFind more SCM connectors in the m2E MsHc&tplaefinishCancel5.3添加文件到git暂存区 制” edip.pFj let lipserj maitpr r-Jr 4够帆iH44十sd 过* FAflirt & A java 曰 comJ kft eclip堤衍 -牛曲2 人T色屮q*4illopublic clft Apppublic stdtic V9idStrinsflSystecut,prinln(lei 1 OpefiOpen Vi rth占 ta
35、rgetX 匸 lidfpath吕git g no reK .pncxTi识 pam.xmlJ t*ect LestPojQr saltings d main 丄iavaJ :扌 com 丿吕呵CopyP.DeleieRename.EicpQrL.R.eFrh&lkew i n RKTiere Syrterm: vizVnlldMeCoverage AsRun As; tJicgetTMffl vdCommit.hrl+*X xldnGpjvfchComprr Wi加eposto-r禹,gitignorx acjwFtepLoce MthAcKh needt屈 pom.xmlPropertie
36、sMb?亡 loci4 ftp-mow frcm CowrtClri+*!(-* &hfc+Do*iShow lofl htoiyMarie as Li- dmaFk.Ctrl+AltMhift+WCreate P日Hh-A用ly *tdi“filled Chdr*Adc tc IncexEgnareteDebug AsProf r XWeb SeviwsShow h HitcryShew h RopositQriM View3-:_ R的 iion lrk jriidL5.4提交文件到本地仓库鼻 Ojei 亡TipwPtj clip苗i-F片 mrtitrr Er. lhll 0)* :自T
37、* AB册KfiptePi耳 Trittjjii.flNrw0nOpen Withpack -|E 已 rDB axrrji. te & .setlingi冷*沁* 毎= ma n 昂p问曰i com冲行鼻x rq Ltstr = afMOExport.Shew in Reffiofte 5yerr v*tvValid aleDm纵J勺加Profile A nj4 L tdipseij . 坤匚 工4 . r CCiPTlOp*nOpen Wi0iCw4 idMKfhCtll-i皿冋ncre S pFETjed!曉 pn.nl亠 冷*|rS.iP-ijjw1 riA sfwing事n trR
38、fl rTHF-isBImpcrL.ExportDatugi a:Protic Ail4| = FWi* ;五 A JB*3!鼻Q * tti和卜百畠咱 eg :曲如 鼻 tjnae(4 用9申H Ji, .gpgiwt(In pFdTe-amCcrnprte 輿讪Rephte呼描ProperhetWd-iFrh tt1 h iAJt - -ihiftTDiL.Corl -A.h 4-hih- Up43 C wrmt.-crrlt*C 叩 mitel*LWlMSfl- TfrglMig Ul k-C-sfac批苗 SiduifiQ豊阳內Patch.対 Cid di*nCitdte阳此-jg話T
39、o71乩h -riAiSir _Push Results: git192168.5.254:develcpGroup/eclipsePrj.gitPushed to git54:developGroup/eclipsePrj.gitCD令0厶為 master - master 943f8c9.de4f4b7 (1)4+1D 尋 943f8c9a: ffff ;wsl on 2017-12-19 17:33:20)Message DetailsRepository gitl54 : dQVQlopGroup/eclipsePr j gitOK5.6解决文
40、件冲突远程服务器文件如下图: awjm 爸的卫t B tua IFK kQf- EOTt;P厂$public Ij& gIiinAkir itilgf mil BiiiHrld!4八I Hello nKrlpublic class Apppublic static void Min( Str一 it亠jeered - w %找omopSystemouf卩厂:1】门(*!.System.C4/t.println( H. c Systemo/eprlntlnf - System.ovt. print ln(* SiPutfi ConflimtttofiCcrirmevpected pus fC.Repositoryssh:
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年衡阳辅警招聘考试题库及答案详解(各地真题)
- 2025年甘孜藏族自治州辅警招聘考试真题附答案详解(轻巧夺冠)
- 2025年漳州辅警招聘考试真题及答案详解(有一套)
- 2025年苗栗县辅警招聘考试题库附答案详解(b卷)
- 2025年白银辅警招聘考试题库有答案详解
- 2025年韶关辅警招聘考试题库附答案详解(轻巧夺冠)
- 2025年苗栗县辅警招聘考试题库含答案详解(考试直接用)
- 2025年衡阳辅警协警招聘考试备考题库(含答案详解)
- 2025年海西州辅警协警招聘考试备考题库及答案详解(有一套)
- 2025年许昌辅警招聘考试真题附答案详解
- 儿科麻醉管理
- 2025至2030中国PEEK牙科植入物行业项目调研及市场前景预测评估报告
- 国家安全教育(中国人民公安大学)学习通网课章节测试答案
- 2024年《广西壮族自治区建筑装饰装修工程消耗量定额》(上册)
- GB/T 2423.17-2024环境试验第2部分:试验方法试验Ka:盐雾
- 山东省汽车维修工时定额(T-SDAMTIA 0001-2023)
- 生态文明建设理论与实践智慧树知到答案章节测试2023年东北林业大学
- GB 18281.4-2015医疗保健产品灭菌生物指示物第4部分:干热灭菌用生物指示物
- 2021-2022年分层教学教研记录
- 电池梯次利用方案课件
- 高等工程流体力学课件
评论
0/150
提交评论