Git Repository Commands - BRS MEDIA TECHNOLOGIES
Git Command

Git Repository Commands

Basic GIT Commands

  • git config –global user.email “[email address]”
  • git init [repo name]
  • git clone [URL]
  • git add (filename),
  • git add *
  • git commit –m [type in a message]
  • git commit -a
  • git diff
  • git diff -staged
  • git diff [first branch] [second branch]
  • git reset [file]

Intermediate GIT Commands

  • git rest [commit]
  • git reset –hard [commit]
  • git status
  • git rm [file]
  • git log
  • git log –follow [file]
  • git show [commit]
  • git tag [commitID]
  • git branch
  • Git branch [branch-name]

Advanced Commands

  • git branch –d [branch name]
  • git checkout [branch-name]

How to do git checkout?

  • git checkout
  • git checkout –b –track /
  • git checkout specific-commit-id
  • git checkout branch_name
  • git checkout –b new branch_name
  • git checkout –b
  • git checkout
  • git fetch origin
  • git checkout –b branch_name origin/branch_name
  • git branch
  • git checkout –b checkout_demo

Related Article

Ubuntu-20.04-LTS-Focal-Fossa

How to Upgrade Ubuntu 18.04 LTS to Ubuntu 20.04 LTS

Good news for Ubuntu users, Canonical has released Ubuntu 20.04 LTS on 23rd April 2020. As it is an LTS […]

calmav an open source antivirus

Easy solution for LibClamAV Error

Easy solution for “LibClamAV Error: cli_loaddbdir(): No supported database files found in /var/lib/clamav” error After a fresh install of Virtualmin […]

containers vs virtualmachines

Containers vs Virtual Machines

Maintaining a large software application is not an easy task since it may contains lots of dependencies and Operating System […]