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
相关推荐
提笔了无痕7 小时前
git基本了解、常用基本命令与使用
git·后端
一苓二肆11 小时前
代码常用工具使用
git·vscode·docker·github·vim
Elieal11 小时前
12 Git 多人协作(完整版工作流)
git
好好研究12 小时前
Git - 项目克隆命令、冲突处理流程
git·gitee
空空kkk12 小时前
Git——多人协作
git
Cx330❀13 小时前
Git 分支管理完全指南:从基础到团队协作
大数据·git·搜索引擎·全文检索
梅梅绵绵冰14 小时前
Git版本控制
git
好好研究14 小时前
Git - 多人协作流程
git·gitee
_OP_CHEN14 小时前
【Git原理与使用】(五)Git 多人协作:从分支协作到冲突解决,团队开发效率翻倍秘籍
linux·运维·git·团队开发·运维开发·企业级组件·git多人协作
wangjialelele16 小时前
git工作原理、个人使用到多人协作开发与git FLOW模型
c语言·c++·git·团队开发·个人开发