版本库Git说明信息
This commit is contained in:
parent
8929644ab1
commit
6b7a17de8c
|
@ -34,9 +34,9 @@
|
|||
<div id="repos_git_more">
|
||||
<br>
|
||||
<div class=" c_dark f14">
|
||||
<p>项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码</p>
|
||||
|
||||
<p>建立版本库文件夹,打开命令行执行如下:</p>
|
||||
<p>项目代码请设置好正确的编码方式(utf-8),否则中文会出现乱码。</p>
|
||||
<p>通过cmd命令提示符进入代码对应文件夹的根目录,假设当前用户的登录名为user,版本库名称为demo,需要操作的版本库分支为branch。
|
||||
如果是首次提交代码,执行如下命令:</p>
|
||||
</div>
|
||||
<div class="repos_explain">
|
||||
<p>git init</p>
|
||||
|
@ -46,19 +46,19 @@
|
|||
<p>git commit -m "first commit"</p>
|
||||
|
||||
<p>git remote add origin
|
||||
http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git
|
||||
http://user_demo@repository.trustie.net/user/demo.git
|
||||
</p>
|
||||
|
||||
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
||||
|
||||
<p>git push -u origin master:master</p>
|
||||
<p>git push -u origin branch:branch</p>
|
||||
</div>
|
||||
<!--repos_explain end-->
|
||||
<div class="c_dark f14">
|
||||
<p>已经有本地库,还没有配置远程地址,打开命令行执行如下:</p>
|
||||
</div>
|
||||
<div class="repos_explain">
|
||||
<p>git remote add origin http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git</p>
|
||||
<p>git remote add origin http://user_demo@repository.trustie.net/user/demo.git</p>
|
||||
|
||||
<p>git add .</p>
|
||||
|
||||
|
@ -66,14 +66,14 @@
|
|||
|
||||
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
||||
|
||||
<p>git push -u origin master:master</p>
|
||||
<p>git push -u origin branch:branch</p>
|
||||
</div>
|
||||
<!--repos_explain end-->
|
||||
<div class="c_dark f14">
|
||||
<p>已有远程地址,创建一个远程分支,并切换到该分支,打开命令行执行如下:</p>
|
||||
</div>
|
||||
<div class="repos_explain">
|
||||
<p>git clone http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git</p>
|
||||
<p>git clone http://user_demo@repository.trustie.net/user/demo.git</p>
|
||||
|
||||
<p>git push</p>
|
||||
|
||||
|
@ -87,7 +87,7 @@
|
|||
</div>
|
||||
<div class="repos_explain">
|
||||
<p>git remote add trustie
|
||||
http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git
|
||||
http://user_demo@repository.trustie.net/user/demo.git
|
||||
</p>
|
||||
|
||||
<p>git add .</p>
|
||||
|
@ -96,7 +96,7 @@
|
|||
|
||||
<p>git config http.postBuffer 524288000 #设置本地post缓存为500MB</p>
|
||||
|
||||
<p>git push -u trustie master:master</p>
|
||||
<p>git push -u trustie branch:branch</p>
|
||||
|
||||
<p><a href="/users/646" class="c_orange">李海</a>提供</p>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue