首页 > 代码库 > gitlab 建仓的流程

gitlab 建仓的流程

repository:仓库
Git global setup:
git config --global user.name "Administrator"git config --global user.email "admin@example.com"
Create Repository
mkdir documentcd documentgit inittouch READMEgit add READMEgit commit -m ‘first commit‘git remote add origin git@gitlab.example.com:root/document.gitgit push -u origin master
Existing Git Repo?
cd existing_git_repogit remote add origin git@gitlab.example.com:root/document.gitgit push -u origin master
[root@ok document]# git initReinitialized 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 masternothing to commit (working directory clean)[root@ok document]# git remote add origin git@192.168.1.103:root/document.gitfatal: remote origin already exists.[root@ok document]# git push -u origin masterCounting 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 -> masterBranch master set up to track remote branch master from origin.

 

gitlab 建仓的流程