bitna kim
    • 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
    35
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # Git 명령어 총정리집 (by 코딩알려주는 누나❤) ![](https://c.tenor.com/UNTqMDwqh1gAAAAM/hello-hi.gif) 안녕하세요 여러분 :) 😊 코딩알려주는 누나 채널을 통해 오신분들 환영합니다! 제 자료가 git을 처음 공부하시는 분들께 항상 와서 들여다 볼 수 있는 유용한 자료가 되었으면 좋겠습니다!👍👍 **본자료는 강의의 참조자료로📘 이 자료를 이해하시려면 강의를 먼저 보시는게 좋습니다.** * **강의 1탄** 👩‍🏫: https://youtu.be/lelVripbt2M * **강의 2탄** 👩‍🏫: https://youtu.be/cwC8t9dno2s ## Git 설치 & 환경설정 🔍 1. Git 설치하기 : https://git-scm.com/ 2. 설치 완료 후 Git bash 열기 3. git bash 에서 환경설정 하기 * Step 1 : 유저이름 설정 ``` git config --global user.name "your_name" ``` ![](https://i.imgur.com/3K7SVcQ.png) * Step 2 : 유저 이메일 설정하기 ``` git config --global user.email "your_email" ``` Github가입시 사용한 이메일을 써주세요! ![](https://i.imgur.com/0jnWuqO.png) * Step 3 : 정보 확인하기 ``` git config --list ``` ![](https://i.imgur.com/q9GdGGI.png) ## Github에 처음 코드 업로드하기 🏋️‍♂️ 1. 초기화 ``` git init ``` 3. 추가할 파일 더하기 ``` git add . ``` _**.(점)** 은 모든 파일이라는 뜻, 선택적으로 올리고 싶으면 add뒤에 파일 이름 붙여주면 됨 (예. git add index.html)_ 4. 상태 확인 (선택사항) ``` git status ``` 6. 히스토리 만들기 ``` git commit -m "first commit" ``` _-m 은 메세지의 준말로 뒤에 "" 안에 주고싶은 히스토리 이름을 주면 됨 (즉, 구지 first commit일 필요가 없다는 뜻^^)_ 8. Github repository랑 내 로컬 프로젝트랑 연결 ``` git remote add origin https://github.com/bitnaGithub/firstproject.git ``` _이 명령어는 github에서 복사해서 붙여와야함 (유투브 강의 참조)_ 7. 잘 연결됬는지 확인 (선택사항) ``` git remote -v ``` 내가 연결한 주소값이 잘 뜨면 성공!🎇 10. Github로 올리기 ``` git push origin master ``` _master 자리에는 branch이름이 들어가면 됨 branch이름이 main라하면 git push origin main 이라고 써야함_ ## Github에 계속 업데이트 하는법 🤹‍♂️ 1. 추가할 파일 더하기 ``` git add . ``` 3. 히스토리 만들기 ``` git commit -m "first commit" ``` 5. Github로 올리기 ``` git push origin master ``` 내 컴퓨터에 소스코드를 업데이트를 하고 싶으면 이 **세개의 스텝만** 계속 반복하면 됨. ## Github로 팀프로젝트 하는법 👨‍👩‍👧‍👦 1. Github에서 소스코드 다운로드 ``` git clone 주소 폴더이름 ``` * 주소는 깃허브에서 들고와야함 * 폴더이름은 선택사항이다 (즉 없어도됨) 폴더이름을 줄경우에는 그 폴더가 새로 생성이 되면서 그 안에 코드들이 다운로드가 되고, 폴더이름을 안줄경우엔 깃허브 프로젝트 이름으로 폴더가 자동으로 생기고 그안에 코드들이 다운로드된다. 3. Github에서 내 브렌치(branch)만들기 ``` git checkout -b 브렌치이름 ``` 5. 내 브렌치에 소스코드 업데이트하기 ``` git add . git commit -m "first commit" git push origin 브렌치이름 ``` 7. 마스터 브렌치에 소스 가져오기(pull) ``` git pull origin master ``` pull을 하기전에는 기존에 소스코드들을 commit을 먼저 해놔야 한다 (2탄 강의참조) 9. 브렌치끼리 이동하는 법 ``` git checkout 브렌치이름 ``` 강의에서 소개하진 않았지만 내가 내 브렌치에서 마스터 브렌치로 이동을 하고 싶거나 다른 브렌치로 이동하고싶으면 해당 명령어를 쓰면 된다 깃 명령어를 가장 잘 연습할수 있는 방법은 여러분이 **친구끼리👨‍👩‍👧‍👧** 한번 뭉쳐서 팀 프로젝트를 같이 해보는 겁니다! 한번 다같이 팀프로젝트를 해보면서 부딛히고 실수하고 깨져봐야 마음으로 느껴지실겁니다❤ 여러분들의 무한한 발전을 위하여! 이 누나가 항상 응원하겠습니다🚀🚀

    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