papatenko
    • 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 New
    • Engagement control
    • Make a copy
    • 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 Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy 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
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    **NOTE**: If you want to see our images/gifs much more clearly, remember to right click on them and `Open them in New Tab`. Thank you. # Explaining Git & GitHub > By Lance & Juan ## What is Git? Git is a *local* **V**ersion **C**ontrol **S**ystem (VCS). It is used by programmers to keep track of their changes, and to collaborate with others. Git stores data like a series of snapshots. Every time you `commit`, Git takes a "snapshot" of what your files look like at the time and stores a reference to the screenshots. Creating a history of what you have added, deleted, or altered. The history of your changes is stored locally and can be lost, but can be stored on the cloud using your favorite cloud-based hosting service we will be using GitHub. ## What is GitHub? GitHub is a website that utilizes Git and allows users to collaborate and publicly share files. On GitHub, you can create a project and invite other GitHub users to collaborate with you. The website utilized the command line to make updating quick and easy. GitHub accounts are also public which makes them a great addition to a resume. ### Analogy Think of a show or movie like Loki that has a timeline that has alternate branches. Git allows you to create branches which are kind of like deviations from the main timeline. In these repos you can make changes and test them without making changes to the main bracnh or main timeline. Once you like the changes, you can commit the changes to the main branch. ![branches](https://hackmd.io/_uploads/ByB6n_An6.png) # Installing Git & making a GitHub Account > By Justin & Rafael ## Git (Web) If you'd want to download Git (Windows, MacOS, & Linux) via web, go [here.](https://git-scm.com/downloads) Instructions for install are provided there. Follow the instructions that are according to your Operating System, if you need help, don't forget to ask us for help. ## Signing Up to GitHub Go to github.com and create an account by entering your email address at the box at the main page, or by clicking on ```Sign Up``` on the top right corner. * Create your account with your email and a password. # Git & GitHub Integration > By Justin ## User configuration on Git *Assuming you have a GitHub Account:* 1. Open up your terminal 2. Type in the following commands to authenticate your GitHub account with local Git CLI (make sure they match!) <pre> git config --global user.name "Your Name" git config --global user.email "your.email@example.com" </pre> ### Extra SSH Configuration *(Required for Linux & Mac OS due to HTTPS support ended in 2022 for these opporating systems)* 1. Create a SSH key <pre> ssh-keygen -C "your.email@example.com" </pre> This will prompt you to enter a file to name and a passphrase, you can just press `Enter` multiple times if you don't want to specify a file or passphrase. 2. Add the SSH key <pre> ssh-add ~/.ssh/id_rsa </pre> 3. Copy content from `~/.ssh/id_rsa.pub` <pre> cat ~/.ssh/id_rsa.pub </pre> This will display the content of the file, copy the content of the file by selecting the text and pressing `Ctrl + Shift + C`. 4. Paste the content onto your GitHub account Go to your [SSH and GPG Keys](https://github.com/settings/keys) settings page: ![image](https://hackmd.io/_uploads/H13Y5iP06.png) Press `New SSH Key` and copy the content into the `Key` field: ![image](https://hackmd.io/_uploads/Hk2jqowAT.png) 5. Test your SSH Connection <pre> ssh -T git@github.com </pre> If it outputs *"Hi (Your Name)! You've successfully authenticated, but GitHub does not provide shell access"*, then you successfully made the connection. Otherwise, panic. 6. If you can connect successfully to Github by SSH, then tell Git about your new way to connect to Github <pre> git config --global gpg.format ssh </pre> 7. Once you've told Git about your new way to authenticate yourself to Github, we'll need to send our key as *proof* that we are who we are: <pre> git config --global user.signingkey <i>/PATH/TO/.SSH/KEY.PUB</i> </pre> * You can find your key in your home folder (the folder of your user) under the `.ssh` folder. ## Creating a GitHub Repository The GitHub homepage should be your dashboard, so it should look similar to this: ![2024-02-29_16-03](https://hackmd.io/_uploads/H12OyK02p.png) Create your repository by clicking on the green ```New``` button next to ```Top Repositories```. ## Configuring your GitHub Repository On the ```Create a New Repository``` page, you could find some setings to configure your repository. The only **required** setting you must input would be the name of the repository. The other options (Publicity of repository, README Inititalization, etc) can be configured to your liking (the descriptions for every option are provided below them). # How to use Git > By Rafael Alright, now that you've created your own repository, we need to create a directory to use for *using* Git. Find a place to create a folder for your repository (should be similar to the name of your GitHub repository) and enter into the folder. For Windows, you could click on your search bar in File Explorer and type `cmd` so that your Command Prompt could land on your repository easily. ![going into cmd](https://hackmd.io/_uploads/Syle_HY5ha.gif) For Macintosh & Linux, open up your terminal, and type in: <pre> cd <i>/path/to/your/repo/folder</i> </pre> --- Now we can actually begin setting things up! ## Initializing your Local Repository We first need to initialize the directory for Git, so we'll type: <pre> git init </pre> ## Creating a Remote Once you've done that, we now have to connect our repository from GitHub to our local repository in our current folder. We can do that by creating a *remote* (short for remote repository). First we need to grab the HTTPS link to our repository at GitHub. So lets go back to where we left off in our successful creation of your repository and copy that. ![grabbinghttps](https://hackmd.io/_uploads/rkb_bqc3a.gif) Once you've gotten your link, go back to your terminal and create your remote using this command: <pre> git remote add origin <i><LINK OF REPOSITORY></i> </pre> * **NOTE:** ```origin``` is the default name of remote. * **NOTE:** Linux & Mac OS users will have to copy the SSH link instead of HTTPS link If it returns nothing, then that's what it's meant to do, no worries there. ## Creating a local branch Although we have a remote, we also need a *branch* for that remote to push & pull files between your repository at GitHub and your local repository. GitHub's default branch is called `main` so we'll create a local branch with the same name so they're paired up. <pre> git checkout -b main </pre> *NOTE: the `-b` flag creates the `main` branch* Output: ![2024-02-26_16-39](https://hackmd.io/_uploads/SJrcX992p.png) ## Creating and Staging your README file Since we have nothing on our local repoistory to *commit*, then we'll create a README file. <pre>echo "<i>your text here</i>" >> README.md</pre> **NOTE:** * ```echo``` is a terminal command that 'echoes' out any message provided next to it * ```>>``` is a keyword that *adds* <code>"<i>your text here</i>"</code> to the latest line of the destination its going to. In this case, it's creating <code>README.md</code> <b>and</b> writing <code>"<i>your text here</i>"</code> to it. ## Sending your First Commit If you looked at the files in your folder, you'll notice that ```README.md``` has now appeared in it. Now we'll have to tell Git to add ```README.md``` in order to ready our commit. <pre>git add README.md</pre> Once you've added your file, we can check the status of the file by executing: <pre>git status</pre> ![2024-03-16_14-11](https://hackmd.io/_uploads/SJMM1d7Aa.png) We can now prove that ```README.md``` is added into git and is ready to be sent to be commited. ## Sending your first commit in Git By 'commiting' we tell Git & GitHub that we're confirming final changes to our repository for submission. In order to commit on Git, you must tell Git the description of your change(s) made in your repository. <pre>git commit -m "<i>your message here</i>"</pre> In our case, we can say `"Added README.md"` as our message. ### For Windows Users: You'll see this as your popup after commiting, so you can just sign in: ![image](https://hackmd.io/_uploads/SytgDOXCa.png) As a result, once authenticated, you'll be able to see the output in your terminal indictating that the your commit has been successful. ![2024-03-16_14-47](https://hackmd.io/_uploads/HkuKuu7Ra.png) ## Pushing your commit to your GitHub Repository Once everything is set and you've commited your `README.md` file, you can finally 'push' or send your commit to GitHub by: <pre>git push -u origin main </pre> * `-u`: Add an upstream (tracking) reference to main. And... if you see this: Congratulations! You've pushed your commit onto GitHub! Go and check your repository on GitHub! ![2024-03-16_15-31](https://hackmd.io/_uploads/B1D2WKXCa.png) ![2024-03-16_15-39](https://hackmd.io/_uploads/SJPdXtm0T.png) # Activity (Story Game - Creative Writing) > By Truc ## Preparation: 1. Make a group of 2-4 members 2. Initialize a Git repository. 3. Share the Repo with your team members assuming you know their `username` and `email address` ![image](https://hackmd.io/_uploads/BkR0ftAhp.png) ## Context: An RPG style story. Let's start with: If having trouble teaming up, try this link and pick the same/favorable zodiac animal to work with: [Link](https://drive.google.com/drive/folders/1ps4HphJy4SI3Ta4AaIvC8BhMtDHuvUVJ?usp=sharing) 1. Character: a. Origin b. Abilities c. Weakness(es) 2. Challenges: a. Devin b. Elon Musk c. Shrek 3. Stages: a. Dungeon b. UFC Cage c. Paris ## Execution: - Have each member design certain paths in the story. - Members work on seperate files, commit their changes and push them to the repository. - Encourage member to review each other's contributions and continue building upon the story until the time is up. - Facilitate a discussion where each group shares their section of the story and how it connects with the overall narrative. - Review the final story together as a group - Exchange stage 3 with other groups. **DO NOT EDIT IT!** - Share it with the club to have a good laugh. # Extra Resources > By Justin ## Documentation - [Git](https://git-scm.com/doc) - [GitHub](https://docs.github.com/en) - [GitHub SSH Authentication Guide](https://jeffbrown.tech/github-ssh/) ### Other Git/GitHub Apps - [Lazygit](https://github.com/jesseduffield/lazygit) - [GitHub Desktop](https://desktop.github.com/) - [GitLens VSCode Extension](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens)

    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