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

git push文件到远程github或者gitlab

时间:2018-05-28 22:49:52      阅读:339      评论:0      收藏:0      [点我收藏+]

标签:oba   pos   readme.md   rename   nbsp   conf   tla   config   远程   

 1 Git global setup
 2 
 3 git config --global user.name "luozeng"
 4 git config --global user.email "354020912@qq.com"
 5 
 6 Create a new repository
 7 
 8 git clone https://gitlab.com/luozeng/blog.git
 9 cd blog
10 touch README.md
11 git add README.md
12 git commit -m "add README"
13 git push -u origin master
14 
15 Existing folder
16 
17 cd existing_folder
18 git init
19 git remote add origin https://gitlab.com/luozeng/blog.git
20 git add .
21 git commit -m "Initial commit"
22 git push -u origin master
23 
24 Existing Git repository
25 
26 cd existing_repo
27 git remote rename origin old-origin
28 git remote add origin https://gitlab.com/luozeng/blog.git
29 git push -u origin --all
30 git push -u origin --tags

 

git push文件到远程github或者gitlab

标签:oba   pos   readme.md   rename   nbsp   conf   tla   config   远程   

原文地址:https://www.cnblogs.com/luozeng/p/9102453.html

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