git 원격 창고 생성

1. 새 창고를 생성합니다.

2. Git 전역 설정:

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

3. 기존 창고 폴더:

//初始化
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. 프로젝트 폴더 열기 1단계: 프로젝트 상태 확인

git status

5. 새 분기를 만들고 완료 후 기본 분기에 병합합니다.

git checkout -b 分支名

6. 모든 지점 보기:

git branch

7. 임시로 로컬에 저장:

git add .

git stash save "init"

git stash list

git stash apply stash@{0}

git status

8. 로컬 분기를 원격에 제출합니다.

git push origin component:component

9. 원격 분기를 로컬로 가져옵니다.

git pull origin 分支名

10. 기타 일반적인 명령:

更新远程分支列表
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>

추천

출처blog.csdn.net/weixin_57092157/article/details/119985768