08-Git&GitHUb

Version Control Git (Part.22~Part.30)[GitHub(Part.30)] | Completing the Sample Site(3)

Version Control (Part1-Part.11) [Git] articles are available on Amazon kindle Unlimited (e-book).

howahowablog.com will only be able to read Part.5/10/11.

Version Control (Parts 12-21) [GitHub (Part 1)] articles are available on Amazon kindle Unlimited (e-book).

Only part15/19 will be available on howahowablog.com.

Version Control (Part 21-Part.30) [GitHub (Part 2)] articles are available on Amazon kindle Unlimited (e-book).

Only Part.24/30 will be available on howahowablog.com.

Objectives of Chapter 9

Check and perform the development process using Git and GitHub.

Team development flow using Git and GitHub

Confirm the team development process using Git and GitHub

As in the previous chapter, we will review the series of tasks performed in team development.

※This chapter covers 7, 8, and 9.

  1. Move items in “Projects”.
  2. Create a “feature branch” in the local repository, edit the file and commit it.
  3. Merge the “feature branch” into the “develop branch”.
  4. Create a “release branch” and make additional edits if necessary.
  5. Merge the “release branch” into the “develop branch” and the “main branch”.
  6. Push the latest status (the local side) and submit a “pull request”.
  7. Approve the pull request. (Reviewer side)
  8. Merge the “develop branch” into the “main branch” in the remote repository.
  9. “fetch” + “merge” a remote repository into a local repository.

Approve the pull request

In Chapter 9, the pull requests created in the previous chapter are approved. In practice, the code and the person doing the merging work are checked before approval. The instructions here assume that everything has been done.

Click on the “Pull requests” tab under “howahowaSite”.

Click on the one you want to review from the list of pull requests.

In this case, it is a development relating to “Feat: Projects ‘A-001’.” Click on.

It takes you to the pull request details page.

Click on the selection button for the merge type and select “Create a merge commit”.

Click on “Merge pull request”.

When the display changes to the following, click “Confirm merge”.

Click on “Confirm merge” and the display changes to “Merged” to complete the merge.

Merge the “develop branch” into the “main branch” in GitHub

Continue by approving the pull request and merging the “develop branch” with the updated content into the “main branch”.

Click on the “Pull requests” tab on GitHub.

On the page that appears, click “New pull request”.

The “Compare changes” page appears. On the “Compare changes” page, select the merge target and the merge source.

Select “main” for the “base” side and “develop” for the “compare” side.

After making your selection, click on “Create pull request”.

The screen changes to the “Open a pull request” screen.

In the title, enter “Version 1.00”. In the body, enter “This is a merge as version 1.00.”.

When merging into the “main branch” in this way, enter the version information. After entering the information, click “Create pull request”.

The “pull request” completes and the screen changes. (Captured below)

Scroll through the screen and select the type of merge. In this case, the merge is between Main branches, but in this book, “Squash and merge” is selected.

※Merge methods vary according to the rules of the team and are not uniformly applied.

After selecting the merging method, click on the button.

The display changes as follows. Click “Confirm squash and merge” without making any changes.

The display switches to “Merged” and the merge is complete.

This completes the merging process in the remote repository.

“fetch” + “merge” a remote repository into a local repository.

Move your work to the local side: open Visual Studio Code and launch Git Bush. In Git Bush, fetch the “develop branch” by entering the following command

Type “git fetch origin develop” to fetch the “develop branch” from the remote repository into the “remote tracking branch” in the local repository.

Then switch to the “develop branch” in the local repository and merge the contents of the “remote tracking branch”.

Type “git checkout develop” to switch the local repository branch to the “develop branch”.

Type “git merge origin/develop” to merge the “remote tracking branch”(‘remotes/origin/develop’) into the “develop branch”.

This time the merge has been completed using FAST FORWARD (fast forward merge).

Pull a remote repository to a local repository

This time, instead of a “fetch” + “merge” operation, a “pull” operation is used to merge the main branch of the remote repository into the main branch of the local repository.

Although “pull” is less of an operation, “fetch” + “merge” is recommended for beginners.

git checkout main … Switch the branch in the local repository to the “main branch”.

git pull origin main … The main branch of the remote repository is imported into the remote tracking branch of the local repository and further merged into the main branch of the local repository.

The merge is now complete. If you open index.html of the ‘main branch’ in a browser, you will see the completed display and behaviors. This concludes the creation of the sample site using Git and GitHub.

That’s all for this article.

This book, together with the series “Do not think hard Git & GitHub vol.1” and “Do not think hard Git & GitHub vol.2”, is now complete.

「Git・GitHub」おすすめ書籍6選+α【初心者用4冊&実践用2冊&番外編1冊】| 現役エンジニア&プログラミングスクール講師「Git・GitHub」初心者の方がGitの操作を理解するためのお勧めの書籍について取り上げています。また中級者の方が更に進んだ学習ができる実践的な書籍についてお勧めできる2冊を取り上げています。ページの下部には「おすすめのITスクール情報」「おすすめ求人サイト」について情報を掲載中。...

ブックマークのすすめ

「ほわほわぶろぐ」を常に検索するのが面倒だという方はブックマークをお勧めします。ブックマークの設定は別記事にて掲載しています。

「お気に入り」の登録・削除方法【Google Chrome / Microsoft Edge】| 現役エンジニア&プログラミングスクール講師「お気に入り」の登録・削除方法【Google Chrome / Microsoft Edge】について解説している記事です。削除方法も掲載しています。...
【パソコン選び】失敗しないための重要ポイント | 現役エンジニア&プログラミングスクール講師【パソコン選び】失敗しないための重要ポイントについての記事です。パソコンのタイプと購入時に検討すべき点・家電量販店で見かけるCPUの見方・購入者が必要とするメモリ容量・HDDとSSDについて・ディスプレイの種類・バッテリーの持ち時間や保証・Officeソフト・ウィルス対策ソフトについて書いています。...
RELATED POST
08-Git&GitHUb

Version Control Git (Part.22~Part.30)[GitHub(Part.24)]|Pull requests (re-requests)

2024年4月14日
プログラミング学習 おすすめ書籍情報発信 パソコン初心者 エンジニア希望者 新人エンジニア IT業界への就職・転職希望者 サポートサイト Programming learning Recommended schools Recommended books Information dissemination Computer beginners Prospective engineers New engineers Prospective job seekers in the IT industry Support site
08-Git&GitHUb

バージョン管理【Git と GitHub】まとめ|現役エンジニア&プログラミングスクール講師

2023年6月5日
プログラミング学習 おすすめ書籍情報発信 パソコン初心者 エンジニア希望者 新人エンジニア IT業界への就職・転職希望者 サポートサイト Programming learning Recommended schools Recommended books Information dissemination Computer beginners Prospective engineers New engineers Prospective job seekers in the IT industry Support site
08-Git&GitHUb

Version Control Git (Part1-Part.11) [Git (Part.5)] | Overview of "A Directory Managed by Git" and "Three Areas"

2024年3月17日
プログラミング学習 おすすめ書籍情報発信 パソコン初心者 エンジニア希望者 新人エンジニア IT業界への就職・転職希望者 サポートサイト Programming learning Recommended schools Recommended books Information dissemination Computer beginners Prospective engineers New engineers Prospective job seekers in the IT industry Support site
08-Git&GitHUb

Version Control Git (Part1-Part.11) [Git (Part.10)] | Renaming and deleting files/directories in Git-managed directory

2024年4月2日
プログラミング学習 おすすめ書籍情報発信 パソコン初心者 エンジニア希望者 新人エンジニア IT業界への就職・転職希望者 サポートサイト Programming learning Recommended schools Recommended books Information dissemination Computer beginners Prospective engineers New engineers Prospective job seekers in the IT industry Support site
08-Git&GitHUb

バージョン管理(Part1~Part.11)【Git編(Part.10)】| Git管理下ディレクトリでのファイル/ディレクトリ名の変更と削除 | 現役エンジニア&プログラミングスクール講師

2024年1月30日
プログラミング学習 おすすめ書籍情報発信 パソコン初心者 エンジニア希望者 新人エンジニア IT業界への就職・転職希望者 サポートサイト Programming learning Recommended schools Recommended books Information dissemination Computer beginners Prospective engineers New engineers Prospective job seekers in the IT industry Support site
08-Git&GitHUb

バージョン管理(Part1~Part.11)【Git編(Part.11)】|「.gitignore」「.gitignore_global」の設定(Gitに管理させないファイルの設定)| 現役エンジニア&プログラミングスクール講師

2024年1月30日
プログラミング学習 おすすめ書籍情報発信 パソコン初心者 エンジニア希望者 新人エンジニア IT業界への就職・転職希望者 サポートサイト Programming learning Recommended schools Recommended books Information dissemination Computer beginners Prospective engineers New engineers Prospective job seekers in the IT industry Support site