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
相关推荐
用户47861297206923 小时前
Git:如何排查非线性历史中被隐秘覆盖的修改(完整实战笔记)
git
weixin_377634847 小时前
【Git使用】PyCharm中的Git使用
ide·git·pycharm
爱吃泡芙的小白白8 小时前
vscode、anaconda、git、python配置安装(自用)
ide·git·vscode·python·anaconda·学习记录
ALex_zry15 小时前
Git大型仓库推送失败问题解决方案:大文件传输优化指南
git
草莓熊Lotso15 小时前
Git 分支管理:从基础操作到协作流程(本地篇)
大数据·服务器·开发语言·c++·人工智能·git·sql
w***Q35018 小时前
Git工作流自动化
运维·git·自动化
舒一笑1 天前
GitPulse:让代码的故事自己讲述
git·程序员·intellij idea
5***o5001 天前
Git在代码中的GitHub
git·github
还是会想她1 天前
git 常见命令
git
1***y1781 天前
Git在发布流程中的自动化标签
运维·git·自动化