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 "[email protected]"
Create a new repository
bash 复制代码
git clone [email protected]: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 [email protected]: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 [email protected]:workdemo/musicplayer.git
git push -u origin --all
git push -u origin --tags
相关推荐
4Forsee1 小时前
【Git】从本地存档到协作开发的Git简单使用
git
Э时间行者于我3 小时前
git同时删除多个分支
git
我的golang之路果然有问题10 小时前
给git配置SSH(github,gitee)
经验分享·笔记·git·学习·gitee·ssh·github
漫步企鹅11 小时前
[Git] Git Stash 命令详解
git·git push·git pull·git commit·git pull rebase
船长@Quant13 小时前
协作开发攻略:Git全面使用指南 — 第二部分 高级技巧与最佳实践
git·版本控制·源代码管理·协作开发
用户126538387051215 小时前
github 和 gitee 配置问题及相关问题解决
git·github
极小狐16 小时前
极狐GitLab Git LFS 速率限制如何设置?
运维·git·ssh·gitlab·github
极小狐16 小时前
如何解决极狐GitLab 合并冲突?
人工智能·git·机器学习·gitlab
一袋米扛几楼9816 小时前
【GIT】github中的仓库如何删除?
git·github
hjm470219217 小时前
GIT 使用小记
git