kozzy
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # eLV Git 勉強会 事前課題 ## 1. 秘密鍵、公開鍵の作成と設定 ### 1-1-1. Windows の場合 * https://qiita.com/manabu-watanabe/items/ecf1b434baf305adaa00 を参考にして作成して下さい ### 1-1-2. MacOS, Linux の場合 * https://qiita.com/reflet/items/0c338df07d9f6c6ef776 を参考に作成してください 下記に実行例を示します コマンドライン ``` $ install -m 0700 -d ~/.ssh $ cd ~/.ssh $ ssh-keygen -t rsa -b 4096 -C "<Your_Github_Address>" -f ~/.ssh/id_rsa Generating public/private rsa key pair. Enter passphrase (empty for no passphrase): <-- パスフレーズを入力(任意) Enter same passphrase again: <-- もう一度、パスフレーズを入力(任意) Your identification has been saved in id_rsa. Your public key has been saved in id_rsa.pub. $ ls ~/.ssh id_rsa id_rsa.pub ``` ※ `id_rsa` (秘密鍵)... クライアントPCに配置(他人に教えてはいけません) ※ `id_rsa.pub` (公開鍵)... 接続対象サーバに登録 `authorized_keys` ファイルの権限を変更しておきましょう ``` $ touch ~/.ssh/authorized_keys $ chmod 600 ~/.ssh/authorized_keys ``` `~/.ssh/config` に以下のように追記しましょう。なければ新しく作成しましょう。 `~/.ssh/config` (After) ``` ~/.ssh/config IdentityFile ~/.ssh/id_rsa Host github github.com HostName github.com User git IdentityFile ~/.ssh/id_rsa.github ``` ### 1-2. Github 側への鍵の登録 下記の画像を参考に、Github 側への鍵の登録を行いましょう。 右上から「Profile」を選択 ![](https://i.imgur.com/VVqMKun.png) 「SSH and GPC keys」を選択 ![](https://i.imgur.com/mPkPs1D.png) 「New SSH key」を選択 ![](https://i.imgur.com/FJ0rDNS.png) 下記画像の key の欄に `~/.ssh/id_rsa.pub` の中身を貼り付けましょう。 コマンドライン ``` $ cat ~/.ssh/id_rsa.pub ``` 結果例(このような内容を丸ごとコピーして貼り付ける) ``` ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC2LX+FfVos1LZNnRGAbDVsWz3HiUQYlDQT0gHaBfzrr2JiD1bHCR/FJEqDGrA8wlPKddICGQgX6o+i22wpZ6Cda90mbyS/S91XFjTFt7N8htmDP2sbc7JR3XLpsxwklmikK2ZmAse8G0ZkcufSW... xxxxxx@xxxxx.jp ``` ![](https://i.imgur.com/dBYwhOX.png) ## 2. git の設定の実施 下記コマンドで git の設定を確認しましょう。 コマンドライン ``` $ git config user.name $ git config user.email ``` git の設定を行いましょう。ここで登録されているのが github に登録されているアカウント名、メールアドレスでない場合は下記の設定を加えましょう。 コマンドライン ``` $ git config --global user.name <Name> $ git config --global user.email <Address> ``` `<Name>` 、`<Address> ` は自由に設定できます。 誰が編集したかわかりやすいように、OSのユーザ名、GitHubのアカウント名、普段使いのメールアドレスなどを入力していきましょう。 ## 3. Github アカウントの作成 まず、[GitHub](https://github.com/) にアクセスし、アカウントを作成しましょう。 ## 4. リポジトリの Fork アカウントを作成したら、https://github.com/kozyszoo/git_traning にアクセスしましょう。すると、次の様な画面になりますので、画面右上の「Fork」ボタンを押しましょう。(図参照) ![](https://i.imgur.com/xSiBRdC.png) Fork ボタンを押してしばらくすると、自分の GitHub ユーザネームに紐づいたページ(リポジトリ)が作成されます。 ## 5. github からの clone の実施 Fork したリポジトリから clone (手元へのコピー)をしましょう。 ![](https://i.imgur.com/gvaaOBl.png) コマンドライン ``` $ git clone git@github.com:{Your_Github_Name}/git_traning.git $ cd git_traning ``` ここで、実施した `git clone` では Github から自分の手元にコピーします。 #### git clone ![](https://i.imgur.com/vJeLTpt.png) ## 6. `README.md` の編集の実施 clone が完了したら、 `README.md` を編集しましょう コマンドライン ``` $ vi README.md ``` ※ お好みのエディタを開いて編集頂いても構いません ファイルの中身を下記のように変更しましょう。 `README.md` ``` # git_traning * first change ``` ## 7. github 側への push の実施 コマンドライン ``` $ git status ``` #### git status ![](https://i.imgur.com/EsGbZYg.png) コマンドライン ``` $ git add README.md $ git commit -m 'first commit' $ git push origin master ``` #### git add / checkout ![](https://i.imgur.com/RjljaaH.png) #### git commit ![](https://i.imgur.com/3wE9QiD.png) #### git push ![](https://i.imgur.com/5uvB97N.png) ## 8. github に反映されていることの確認 これらの手順がうまく実施できると、github の自分のリポジトリの内容が以下のように変わっているはずです。 ![](https://i.imgur.com/22cvC17.png) ここまでできれば事前準備は準備は完了です。 この際、そのページの URL を控えて Connpass の参加者登録アンケートで提出しましょう。 ![](https://i.imgur.com/24RjO9E.png) ※ この課題について、うまく実施できなかった場合は当日個別にサポートしますのでお申し付けください。

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully