Skip to content

Latest commit

 

History

History
87 lines (62 loc) · 1.57 KB

gitCheatSheet.md

File metadata and controls

87 lines (62 loc) · 1.57 KB

Git Cheat Sheet

Blogs you can refer:

Steps to Get Started

  1. Download Git on your local machine

    Download Git

  2. Check for Git in CMD/Terminal

    git -v
  3. Configure your local Git (one time)

    git config --global user.name YOUR_NAME
    git config --global user.email [email protected]
  4. Check for the configuration

    git config --list
  5. Install Git Graph in VS Code

  6. Initialize Git Repository

  7. Git Status

    git status
  8. Add file to the staging area

    git add index.html   // add single file
    git add .  // add all files
  9. Commit changes

    git commit -m "your commit message"
  10. Push changes to the remote repository

    git push origin main  // push to the main branch

Additional Commands

  • reset
  • rebase
  • merge
  • squash
  • pull origin
  • remote
  • right commits
  • MD syntax
  • branch
    • cherrypick
  • pull request
  • merge conflicts
  • issue

.gitignore

Right Commits

feat - a new feature fix - a bug fix docs - changes in documentation style - everything related to styling refactor - code changes that neither fixes a bug nor adds a feature test - everything related to testing chore - updating build tasks, package manager configs, etc…