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
相关推荐
Wpa.wk1 小时前
Git日志+分支管理+基础冲突解决
经验分享·git·测试工具
香水5只用六神8 小时前
【DMA】存储器到外设模式实验2
c语言·git·stm32·单片机·嵌入式硬件·github·visual studio
★浅_忆8 小时前
Git入门基础命令
git
待什么青丝9 小时前
同步 Git 仓库修改操作指南
git
Penguido10 小时前
解决 VS Code 中 Git 推送报错:ECONNREFUSED vscode-git.sock 与鉴权失败
linux·git·vscode
无限进步_10 小时前
【C++】只出现一次的数字 III:位运算的巧妙应用
数据结构·c++·git·算法·leetcode·github·visual studio
降临-max11 小时前
Git 从入门到进阶:基础命令与多分支
git
float_六七12 小时前
Git忽略规则终极指南
大数据·git·elasticsearch
无限进步_13 小时前
深入解析vector:一个完整的C++动态数组实现
c语言·开发语言·c++·windows·git·github·visual studio
Codeking__13 小时前
git常用命令小总结
git