gitlab 建仓的流程

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.

 

posted @ 2016-10-01 15:31  bass  阅读(1186)  评论(0编辑  收藏  举报