creación de almacén remoto git

1. Crear un nuevo almacén;

2. Configuración global de Git:

git config --global user.name "Icy"
git config --global user.email "[email protected]"

3. Carpeta de almacén existente:

//初始化
git init
//查看状态
git status
//提交所有文件
git add .
git commit -m "init"
//查看状态
git status
//将本地代码提交到 git 仓库
git remote add origin https://gitee.com/Icyya/aaa.git
git push -u origin master

4. Abra la carpeta del proyecto Paso 1: Compruebe el estado del proyecto

git status

5. Cree una nueva rama y combínela con la rama principal después de completarla:

git checkout -b 分支名

6. Ver todas las sucursales:

git branch

7. Guardar temporalmente en local:

git add .

git stash save "init"

git stash list

git stash apply stash@{0}

git status

8. Envíe la sucursal local al remoto:

git push origin component:component

9. Lleve la rama remota a la local:

git pull origin 分支名

10. Otros comandos comunes:

更新远程分支列表
git remote update origin --prune
 
查看所有分支
git branch -a
 
删除远程分支Chapater6
git push origin --delete Chapater6
 
删除本地分支 Chapater6
git branch -d  Chapater6
 
创建分支:git branch <name>
 
切换分支:git checkout <name>
 
创建+切换分支:git checkout -b <name>
 
合并某分支到当前分支:git merge <name>

Supongo que te gusta

Origin blog.csdn.net/weixin_57092157/article/details/119985768
Recomendado
Clasificación