☀️
Dev7Days
  • 😄Welcome
  • Local Setup
    • ⚙️Setup Terminal
    • ⚙️Setup IDE
    • ⚙️Setup Neovim
  • Rust
    • 🦀Cargo
  • Java
    • 🍃Spring Boot
      • Spring Boot Annotaion
      • Spring Boot Learning
    • 🍃JDK vs JRE vs JVM
    • 🍃What is JDBC ?
    • 🍃What is Data Source in Java ?
    • 🍃Check vs Unchecked Exception
    • 🍃What is Servlet in Java ?
    • 🍃Filter vs Interceptor
    • 🍃Mockito
    • 🍃Maven CLI
    • 🍃Maven Archetype
  • Go
    • 🔹Go Routine and Channel
    • 🔹Go CLI
  • Ruby and Rails
    • ♦️Ruby Syntax
    • ♦️Rails Framework
    • ♦️Rails Structure
  • Fundamental
    • 📚Git Command
    • 📚Interpreter vs Compiler
    • 📚DTO vs DAO
    • 📚Http Status
    • 📚What is Batch Process ?
    • 📚Https
    • 📚Local Storage vs Session Storage vs Cookies
    • 📚Authentication & Authorization
    • 📚Database Index
    • 📚What is GRPC ?
    • 📚What is Microservice ?
  • Database
    • 🗃️What is Transaction ?
    • 🗃️ACID
  • Postgres
    • 🐘SELECT
    • 🐘Column Alias
    • 🐘Order By
    • 🐘SELECT DISTINCT
  • Elastic Search
    • 🔍What is Elastic Search ?
    • 🔍Node and Cluster
  • Kubernetes
    • ☸️What is Kubernetes ?
    • ☸️Kubernetes Architecture
      • Node
      • ETCD
      • Kube API Server
      • Controller Manager
      • Kube Scheduler
      • Kubelet
      • Kube Proxy
  • ☸️Pod
  • ☸️ReplicaSet
  • ☸️Deployment
  • ☸️Service
  • ☸️Config Map
  • ☸️Namespaces
  • ☸️Kube Apply Command
  • ☸️Scheduling
    • Manual Scheduling
    • Labels and Selectors
    • Taints and Tolerations
    • Node Selector
    • Node Affinity
    • Resource Requirements and Limits
    • DaemonSets
    • Static Pods
    • MultipleSchedulers
  • ☸️Monitoring
  • AWS
    • 🔸How can users access AWS ?
    • 🔸IAM
    • 🔸EC2
      • User Data
      • Instance Types
      • Security Group
      • Purchasing Options
      • Placement Groups
      • Elastic Network Interface (ENI)
      • EC2 Hibernate
      • EC2 Storage
    • 🔸ELB & ASG
      • Health Checks
      • Target Group
      • ELB Types
      • Sticky Sessions
      • Cross Zone Load Balancing
      • Load Balancer - SSL and SNI
      • Deregistration Delay
      • ASG
    • 🔸RDS & Aurora DB
      • RDS
        • Storage Auto Scaling
        • Read Replica
        • Multi AZ
        • RDS Custom
        • Backup
        • RDS Proxy
      • AWS Aurora
        • Read Replica
        • Endpoint and Auto Scaling
        • Aurora Serverless
        • Global Database
        • Machine Learning
        • Backup
        • Database Cloning
      • RDS & Aurora Restore options
      • RDS & Aurora Security
    • 🔸Elastic Cache
    • 🔸Route 53
      • Records
      • Hosted Zones
      • Health Check
      • Routing Policies
  • Backend Security
    • 🎩SQL Injection
    • 🎩Cross site script (XSS)
    • 🎩Cross site request forgery (CSRF)
    • 🎩Man in the Middle (MITM)
    • 🎩Insecure Direct Object Reference (IDOR)
    • 🎩Distributed denial of service (DDOS)
  • Medium
    • 👨‍💻Gamer to Coder
    • 🐳Docker
      • Docker #1
      • Docker #2
    • 💊DI and IOC
    • ☸️Kubernetes
  • Book
    • 📚System Design Interview - An Insider's Guide (Volume 1
Powered by GitBook
On this page
  1. Fundamental

Git Command

Describe about Git status and popular Git command

Git Status including 3 status:

  1. modified = file that has been changed.

  2. staged = file that was tracked to be snapshot for new commit.

  3. commit = file that was kept in snapshot.

What is origin ?

ans: Origin is alias for remote repository url.

Git command :

  1. git init = Initilize git repository on existing deirectory.

  2. gitz add <file_name> = Add file to stage status before commit.

  3. git reset <file_name> = Remove file from stage status.

  4. git commit [options] = Add staged file to commit (snapshot) . Example Option

    -n = no verify

    -m = add description of this commit

  5. git diff [options] = Show diffirent between each commit , can use for compare commit.

  6. git branch [options] <branch_name> = List , create or delete git branch. Example Option

    -l = show list of branch (default)

    -d = delete branch

  7. git checkout <branch_name> = Switch branch.

  8. git merge <target_branch_name> = Merge target branch to existing branch by using code from local but when you use git pull origin master , it will use git fetch + git merge (default) but you can change it to rebase by update git config .

  9. git fetch = Fetch every branch from remote repository.

  10. git pull = Fetch every commit from that local branch.

  11. git push = Send every commit from current branch to remote repository.

  12. git rebase <branch_name> = rebase the selected branch to current branch.

  13. git revert <commit_number> = Revert commit from current branch.

  14. git stash = Store modified or staged file to stash. We always use this command when we want to change branch but we don't want to commit file that we changed.

  15. git stash pop = Pop the latest code inside stash to current branch.

  16. git stash list = Show list of code inside stash.

  17. git stash apply <stash_name> = It same as git stash pop but we specify stash name.

  18. git stash drop = Remove latest code from stash.

  19. git cherry-pick <commit_number> = Add specific commit to current branch.

PreviousRails StructureNextInterpreter vs Compiler

Last updated 1 year ago

📚