git 空项目初次提交项目命令记录

Command line instructions

You can also upload existing files from your computer using the instructions below.

Git global setup
bash 复制代码
git config --global user.name "demo"
git config --global user.email "demo@qq.com"
Create a new repository
bash 复制代码
git clone git@gitlab.xxx.com:workdemo/musicplayer.git
cd musicplayer
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Push an existing folder
bash 复制代码
cd existing_folder
git init
git remote add origin git@gitlab.xxx.com:workdemo/musicplayer.git
git add .
git commit -m "Initial commit"
git push -u origin master
Push an existing Git repository
bash 复制代码
cd existing_repo
git remote rename origin old-origin
git remote add origin git@gitlab.xxx.com:workdemo/musicplayer.git
git push -u origin --all
git push -u origin --tags
相关推荐
白帽小野2 小时前
SVN和Git两种版本管理系统对比
git·svn·版本控制系统
rivercoder3 小时前
Gitea:轻量级的自托管Git服务
git·gitlab·gitea
呜喵王阿尔萨斯9 小时前
git命令解析
c++·git
Doris_LMS2 天前
Git的强软硬回退(三)
运维·服务器·数据库·git·idea
瓜酷月..2 天前
GIT(了解)
git
misty youth2 天前
git命令常用指南
git·github
持续迷茫2 天前
lint-staged 中 --verbose 选项的深度解析
前端·git
lostElk2 天前
团队 Git 分管理全流程规范
git·github
亦是行人!2 天前
删除git中已经提交的target、logs、.idea文件
git
匆叔2 天前
Git下载全攻略
前端·git