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
相关推荐
时空自由民.1 小时前
git rebase简介
git
山西瀚辰信安科技有限公司1 小时前
git下载安装及使用
git·学习
梓沂2 小时前
pycharm Git 连接 GitHub 报错全记录:从 SSL 证书到 SSH 密钥,一步步踩坑与解决
git·pycharm·github
无小道3 小时前
Git版本控制及其原理:从入门到精通
git·企业
颂love3 小时前
Git的简单学习
git·学习
一个学Java小白3 小时前
git 如何免密提交之 基于 Gitee 的 SSH 配置教程
git
我是谁??3 小时前
ubuntu22.04在线安装docker和nvidia-container-toolkit
git·docker·github
Kessity3 小时前
Git标签管理
git
悟空瞎说1 天前
Git Worktree 实战:多 AI 编码代理并行开发,彻底解决分支切换冲突痛点
前端·git
BING_Algorithm1 天前
开发常用Git核心知识
git·后端