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 Squash 合并与文件排除流程
git
wunaiqiezixin9 小时前
git常用命令总结
git
Pluchon14 小时前
萌萌技术分享笔记——Java综合项目
java·开发语言·笔记·git·github·mybatis·postman
九思x15 小时前
Git脚本汇总
git
jiayong2315 小时前
git分支合并的切换逻辑详解
git
思麟呀16 小时前
Git入门
git
Ws_16 小时前
Git + Gerrit 第八课:reset 与 revert 撤销提交
git
Qres82116 小时前
hexo博客上传github page
git·github·hexo
繁星星繁17 小时前
Git 入门之道:从版本流转到基础操作
大数据·git·elasticsearch
wh_xia_jun1 天前
Git 分支合并操作备忘录
git