码迷,mamicode.com
首页 > 其他好文 > 详细

gitlab 建仓的流程

时间:2016-10-01 17:19:04      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:

repository:仓库
Git global setup:
git config --global user.name "Administrator"
git config --global user.email "admin@example.com"
Create Repository
mkdir document
cd document
git init
touch README
git add README
git commit -m ‘first commit‘
git remote add origin git@gitlab.example.com:root/document.git
git push -u origin master
Existing Git Repo?
cd existing_git_repo
git remote add origin git@gitlab.example.com:root/document.git
git push -u origin master
[root@ok document]# git init
Reinitialized existing Git repository in /media/6FE5-D831/git-data/local/document/.git/
[root@ok document]# git add  git-document.txt 
[root@ok document]# git commit -m "firsh commit"
# On branch master
nothing to commit (working directory clean)
[root@ok document]# git remote add origin git@192.168.1.103:root/document.git
fatal: remote origin already exists.
[root@ok document]# git push -u origin master
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 431 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
To git@192.168.1.103:root/document.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.

 

gitlab 建仓的流程

标签:

原文地址:http://www.cnblogs.com/bass6/p/5925892.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!