Share
Embed
Transcript
44 slides
-
”好き”を磨いて可能性を広げよう Self Introduction Taramanji (JavaLangRuntimeException) Ritsumeikan Univ. (RM2C Lab) STECH
Manager / JINEN, Inc. CyberAgent, Inc. / NxTEND NewBiz Virtual Reality, Mixed Reality Major Shiga, Kusatsu home biwako.go -
”好き”を磨いて可能性を広げよう Do you ever face these challenges when developing? saas-develop/
README.md main.go ## Concept This is a simple software. update by A Package main import(“fmt”) func main(){ fmt. println(“sample”); Aさんは2つのファイル を作成しました. A created two files. -
”好き”を磨いて可能性を広げよう Do you ever face these challenges when developing? saas-develop/
README.md main.go ## Concept This is a simple software. update by B Package main import(“fmt”) func main(){ fmt. println(“hogehoge”); Bさんは合計2行変更しました . B updated two liles. (BさんはAさんとは別のパソコン で操作しています A and B are working on their own computers.) -
”好き”を磨いて可能性を広げよう Do you ever face these challenges when developing? saas-develop/
README.md main.go ## Concept This is a simple software. update by B Package main import(“fmt”) func main(){ fmt. println(“hogehoge”); AさんはBさんの変更を取り込みたい A wants to merge B's changes. (BさんはAさんとは別のパソコン で操作しています A and B are working on their own computers.) -
”好き”を磨いて可能性を広げよう What is Git ? 分散型バージョン管理システム(Distributed Version Control System)の一種 Git
ファイルの変更履歴を記録・追跡し、いつでも過去の状態に戻したり、 複数の開発者で同時に作業を進めたりするツール It's a tool that records changes to files, allowing you to recall specific versions later and enabling multiple developers to collaborate. ソースコード管理 Source Code Management 変更履歴 (バージョン )管理 Version Management 共同作業の整合性管理 Concurrency Management -
”好き”を磨いて可能性を広げよう What is Repository ? プロジェクトのファイルや変更履歴を保存するの保管場所 It's a central storage
location where a project's files and the history of their changes are saved and managed. リポジトリ (Repository) Source Code Version Author, Conmiter -
”好き”を磨いて可能性を広げよう This is a hands-on session ! まずGithub アカウントの作成からしてみましょう! First,
let's create an account. https://github.com -
”好き”を磨いて可能性を広げよう What is GitHub? https://github.com Gitを利用したソースコード共有・管理サービス。 プロジェクトのデータはリモート(遠隔地)のサーバーに保存される A web service
for source code sharing and management using Git. Project data is stored on a remote server. GitHub 変更履歴の管理が簡単で、安全なバックアップになる。 Easily manage change history and serves as a secure backup. Benefit 1: 履歴管理とバックアップ History & Backup 複数人での作業がスムーズになり、コードの品質を保ちやすい。 Streamlines teamwork and helps maintain code quality. Benefit 2: 円滑なチーム開発 Team Collaboration -
”好き”を磨いて可能性を広げよう Remote Repository & Local Repository プロジェクトのファイルや変更履歴を保存するの保管場所 It's a central
storage location where a project's files and the history of their changes are saved and managed. リポジトリ (Repository) チーム全員で共有するための、サーバー上にある中心的な保管場所。 A central repository on a server, used for sharing among the team. リモートリポジトリ (Remote Repository) 自分のPC内に保存されている、リモートリポジトリの個人用完全コピー。 A complete copy of a remote repository stored on your own computer. ローカルリポジトリ (Local Repository) -
”好き”を磨いて可能性を広げよう A GUI application for Git! https://www.sourcetreeapp.com Gitなどのバージョン管理システムを、直感的なGUIで操作できるようにする 無料のデスクトップアプリケーションです。 It's
a free desktop application that allows you to work with version control systems like Git through an intuitive GUI. Sourcetree -
”好き”を磨いて可能性を広げよう Let’s Hack! https://www.sourcetreeapp.com https://github.com みんなごぞんじぎっとはぶ べんりつぅ〜る ぎっとのいんすとぉ〜る
https://git-scm.com/book/en/v2/ Getting-Started-Installing-Git -
”好き”を磨いて可能性を広げよう Git Clone リモートリポジトリ(サーバー上の保管場所)の完全なコピーを、 自分のローカルマシン(手元のPC)に作成するコマンド。 The command to create a
complete copy of a remote repository (a project stored on a server) onto your local machine (your computer). Git clone clone -
”好き”を磨いて可能性を広げよう Let’s Hack! リモートリポジトリ(サーバー上の保管場所)の完全 なコピーを、自分のローカルマシン (手元のPC)に作成するコマンド。 The command to create
a complete copy of a remote repository (a project stored on a server) onto your local machine (your computer). Git clone GUI CLI -
”好き”を磨いて可能性を広げよう Git Branch 作業履歴の流れを分岐させ、元のコード(メインの履歴)に 影響を与えることなく 、新しい機能の開発やバグ修正など を並行して進めるための仕組み。 完成後は、分岐した作業内容を元の流れに統合(マージ) することもできる。 A
branch is an independent line of development that allows you to work on new features or bug fixes in an isolated environment, without affecting the main codebase (the main history). Once the work is complete, the changes from the branch can be merged back into the main project. Branch とは? (What is branch?) -
”好き”を磨いて可能性を広げよう Git Branch (Create Local Branch) CLI ローカルリポジトリ内に存在し、編集やコミットなど、日々の作業を行うため のブランチ。 A
branch that exists in your local repository. This is where you do your day-to-day work, such as editing files and making commits. ローカルブランチ (Local Branch) -
”好き”を磨いて可能性を広げよう Git Branch (Create Remote Branch) リモートリポジトリに存在するブランチのこと。 チームメンバーと作業内容を共有するために使う。 A branch
that exists on the remote repository. It is used to share your work with team members. ローカルブランチ (Local Branch) -
”好き”を磨いて可能性を広げよう Let’s hack! mainブランチから developmentブランチ を作成しよう! Let's create a development
branch from the main branch. CLI -
”好き”を磨いて可能性を広げよう Let’s hack! 現在のブランチ を確認しよう! Check the current branch! CLI
アスタリスク (*)がついたブランチが現在のブランチです! The branch with the asterisk(*) is the current branch! -
”好き”を磨いて可能性を広げよう Let’s hack! mainブランチから developmentブランチに移動しよう! Let's create a development branch
from the main branch. CLI 現在mainブランチにいるかを確認してね! Let's check if you are on the main branch! -
”好き”を磨いて可能性を広げよう Git Switch リモートで作成したリモートブランチをswitch コマンドで ローカルブランチとして取得することができます You can use the
switch command to check out a remote branch as a new local branch. CLI Git Switch リモートブランチとローカルブランチの区別は ブランチ名の頭にリモートリポジトリ名 (通常はorigin)がつくかどうかで判別します You can distinguish between remote and local branches based on whether the branch name is prefixed with the name of the remote repository (usually origin). -
”好き”を磨いて可能性を広げよう Git Add .git folder Working Area Staging Area 変更を確定したいファイルを、ステージングエリアと呼ばれる場所に追加するコマンド。「次のコミット
(変更確定)に含める変更」を選択する操作 This command adds files with changes you want to finalize to a place called the "staging area." It is the operation of selecting the "changes to include in the new commit (confirmation of changes)." Git add -
”好き”を磨いて可能性を広げよう Git Add .git folder Working Area Staging Area ユーザーが実際にファイルの編集や追加、削除を行う作
業場所。 PC上のプロジェクトフォルダ そのもの。 The directory on your computer where you are currently working. It's where you actually edit, add, and delete files. ワーキングエリア (Working Area) 次のコミットに含めたい変更内容を、 git addコマンドで一時的に登録しておく場所。 コミット前の確認エリア。 A temporary area where changes selected with the git add command are registered before being committed. It's a confirmation area for the next commit. ステージングエリア (Staging Area) -
”好き”を磨いて可能性を広げよう Git Commit .git folder Working Area Staging Area ステージングエリアにある変更内容を、
メッセージと共にローカルリポジトリの履歴(.git folder)に保存(記録)するコマンド。 The command to save the changes in the staging area to the local repository's history (.git folder) along with a descriptive message. Git commit -
”好き”を磨いて可能性を広げよう Let’s hack! add, commitを実行して変更を確定させよう Let's run add and commit
to finalize the changes. CLI コミットにはメッセージを付与する必要があります A commit requires a message. .git folder Working Area Staging Area -
”好き”を磨いて可能性を広げよう Git Push あるブランチにおいてローカルリポジトリ(自分のPC)で行ったコミット(変更履歴)を、リモートリポジト リ(サーバー)にアップロードして共有するコマンド。 The command to upload and
share the commits (change history) made on a specific branch in your local repository (your PC) to a remote repository (a server). Git Push CLI -
”好き”を磨いて可能性を広げよう Git Pull あるブランチにおいてリモートリポジトリ(サーバー)の最新の変更履歴を、 ローカルリポジトリ(自分のPC)にダウンロードして統合(マージ)するコマンド。 The command to download the
latest change history from a specific branch on a remote repository (a server) and merge it into your local repository (your PC). Git Pull CLI -
”好き”を磨いて可能性を広げよう Pull Request 開発者が自分のブランチで行った変更を, mainブランチや他のブランチに統合してもらうため に使 用する Used by
a developer to request that the changes they made on their own branch be merged into another branch, such as main. What is Pull Request? 他の開発者(プロジェクト管理者など )はその変更を レビューし, コメントやフィードバックを提供 することができる Other developers (such as project managers) can then review those changes and provide comments or feedback. What’s the purpose? -
”好き”を磨いて可能性を広げよう Let’s hack! Github上でdevelopmentブランチからmainブランチにpull requestを作成しよう Let's create a pull request
from the development branch to the main branch on GitHub. -
”好き”を磨いて可能性を広げよう Merge あるブランチで行った変更の履歴を、別のブランチの履歴に統合(合流)させる操作のこと。 The action of integrating the history of
changes from one branch into the history of another branch. Merge -
”好き”を磨いて可能性を広げよう Let’s Hack! GithubのPull Requestのページでマージしよう(リモートブランチにおいてマージをしよう) Let's merge the pull request
on the GitHub page. マージ先で変更差分の衝突がないか ,各種チェック (CI/CD)が成功しているか ,を Github上で自動チェックしてくれるので問題ない場合 mergeボタンが押せるようになります GitHub automatically runs checks to see if the branch can be merged without conflicts and if all status checks (like CI/CD) have passed. If there are no issues, the merge button will be enabled. -
”好き”を磨いて可能性を広げよう Let’s Hack! マージ後にmainブランチにdevelopmentブランチの変更が反映されているか github上のmainブランチで確認してみてください Check the main branch on
GitHub to see if the changes from the development branch have been applied after the merge. -
”好き”を磨いて可能性を広げよう Let’s hack! ローカルブランチにおいてmainブランチに移動した後, リモートのmainブランチの変更をpullコマンドで取得してみよう After switching to your local
main branch, let's use the pull command to get the changes from the remote main branch. CLI ローカルのmainブランチにおいて内容が github上のmainブランチと一致するか確認してね Please check if your local main branch is in sync with the main branch on GitHub. -
”好き”を磨いて可能性を広げよう Check out this Article Gitに関して詳しくはこちらの記事から確認してね You can find more
information about Git in this article. https://qiita.com/JavaLangRuntimeException/items/6b46551f56e0def76eba