git forkブランチからコミットへの基本操作
Forkブランチ forkボタンをクリック[外部チェーン画像の転送に失敗し、ソース局に盗難防止チェーン機構がある可能性があり、画像を保存して直接アップロードすることを提案する(img-jcIJogSX-1575370862707)(https://github.com/aoeivu/aoeivu.github.io/blob/master/posts/2019/12/03/1.jpg?raw=true)] 自分のnamespaceを選択してforkが を完了するのを待つ自己gitのブランチを表示する フォーク分岐の内容を引く gitファイルを格納するための新しいパス:H:10_Git\python フォルダに入って右クリック->Git Bash Here をクリックポップアップされたGitウィンドウに次のコマンドを入力フォルダ 自分のforkのブランチに入り、コピー をクリックします. GitのDOSウィンドウ入力に戻り、clone後にコピーされたurlとなり、倉庫クローンが完了するのを辛抱強く待つ を見ることができます. gitウィンドウを閉じて再開gitウィンドウを開く次のコマンド を複数回閉じて再開する. developブランチに切り替えるBUG修正 .任意のバグを修正し、現在のブランチステータス が修正(modified)されていることがわかります.変更されたファイルをコミットする に追加します.ブランチステータス が表示されます.先の修正のためにlogを追加して、testはlogの内容 を見ました現在のコミットをリモートdevelopブランチ にプッシュする.このバグ修復を自分のリモートブランチに提出すると が完了する.
merge forkの元のブランチに変更 Gitページバージョンの自分のブランチに入り、Creat Merge Request をクリックします.合入情報を記入し、具体的には以下の通りである[外鎖画像の転送に失敗した場合、ソース局は盗難防止チェーンメカニズムがある可能性があり、画像を保存して直接アップロードすることを提案する(img-92 uzlpa 3-1575370862722)(https://github.com/aoeivu/aoeivu.github.io/blob/master/posts/2019/12/03/7.jpg?raw=true)] 前のステップChange Branchをクリックして次のインタフェースに入ります今回は自分のdevelopからforkブランチのdevelopにプッシュするので、次のように選択し、Compare branches and continue をクリックします.は自動的に第2ステップインタフェースに戻るのを待っていて、情報が間違っていないことを検査して、Submit merge requestをクリックして、Ownerに比較合併 を行うことを通知します.
forkのリモートブランチには変更があり、最新のforkのリモートブランチを自分のローカルとリモートに同期します.リモートウェアハウスをローカルremoteブランチ に追加現在の倉庫のリモートブランチ を表示する fetchリモートブランチ(最新のリモートブランチをローカルブランチに更新) 結合fetchブランチを自己masterまたはdev に分岐するは、自分のリモートウェアハウス にプッシュする.
git init
を初期化すると、次のようなメッセージが表示されます.Initialized empty Git repository in H:/10_Git/python/.git/
は、次のように戻るgit clone [email protected]:Flynn.Chen/python.git
$ git clone [email protected]:Flynn.Chen/python.git
Cloning into 'python'...
remote: Enumerating objects: 2558, done.
remote: Counting objects: 100% (2558/2558), done.
remote: Compressing objects: 100% (970/970), done.
remote: Total 2558 (delta 1573), reused 2558 (delta 1573)
Receiving objects: 100% (2558/2558), 1.06 GiB | 11.08 MiB/s, done.
Resolving deltas: 100% (1573/1573), done.
Checking out files: 100% (64/64), done.
を入力と、見えない場合はGit DOS git branch -r
$ git branch -r
origin/HEAD -> origin/master
origin/develop
origin/master
を行うと、次のような内容が戻ることがわかるgit checkout develop
$ git checkout develop
Switched to a new branch 'develop'
Branch 'develop' set up to track remote branch 'develop' from 'origin'.
を表示すると、gitignoreファイルgit status
$ git status
On branch develop
Your branch is up to date with 'origin/develop'.
Changes not staged for commit:
(use "git add ..." to update what will be committed)
(use "git checkout -- ..." to discard changes in working directory)
modified: .gitignore
no changes added to commit (use "git add" and/or "git commit -a")
git add .gitignore
を再度確認すると、コミットされる緑のgit status
$ git status
On branch develop
Your branch is up to date with 'origin/develop'.
Changes to be committed:
(use "git reset HEAD ..." to unstage)
modified: .gitignore
は以下の内容git commit -m "test"
[develop 2334660] test
1 file changed, 2 insertions(+), 1 deletion(-)
git push merge forkの元のブランチに変更
forkのリモートブランチには変更があり、最新のforkのリモートブランチを自分のローカルとリモートに同期します.
git push origin develop
git remote add upstream [email protected]:5G-SDX55/Standard.git
$ git remote -v
origin [email protected]:Flynn.Chen/Standard.git (fetch)
origin [email protected]:Flynn.Chen/Standard.git (push)
upstream [email protected]:5G-SDX55/Standard.git (fetch)
upstream [email protected]:5G-SDX55/Standard.git (push)
$ git fetch upstream
remote: Enumerating objects: 129, done.
remote: Counting objects: 100% (116/116), done.
remote: Compressing objects: 100% (46/46), done.
remote: Total 79 (delta 39), reused 62 (delta 22)
Unpacking objects: 100% (79/79), done.
From 192.168.10.95:5G-SDX55/Standard
* [new branch] develop -> upstream/develop
* [new branch] master -> upstream/master
* [new tag] 20191101_B1.01 -> 20191101_B1.01
git merge upstream/develop