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