Fawry cloud devops internship
  • Application production deployment architecture
  • Application Deployment Process
  • Application Deployment pricing
  • Kubernetes ConfigMap and Secret
  • Kubernetes Network
  • Kubernetes PV & PVC
  • kubernetea Labs
  • Kubernetes Session 3
  • Kubernetes Session 2
  • Kubernetes Architecture
  • Amazon SQS
  • AWS SNS
  • AWS Elastic Transcode
  • AWS RDS
  • Amazon Aurora RDS
  • Amazon RDS for Oracle
  • Amazon RDS for PostgreSQL
  • Amazon RDS for MySQL
  • Amazon RDS for SQL Server
  • Amazon RDS Multi-AZ with one standby
  • AWS RDS Automated Backup
  • Amazon RDS - Event Notifications
  • Amazon RDS - DB Access Control
  • Amazon RDS - Data Import / Export
  • Amazon RDS - DB Monitoring
  • Amazon RDS on VMware
  • Amazon Aurora Serverless
  • Cloud Computing
  • AWS
  • AWS Features
  • AWS Global Infrastructure
  • AWS Services
  • AWS IAM
  • AWS S3
  • AWS S3 Lifecycle Management
  • EC2
  • Instance types
  • AMI
  • EBS
  • Elastic File System
  • EC2 Lab with EFS shared
  • AWS Route53
  • AWS VPC
  • EC2 placement group
  • AWS LB
  • EC2 Auto Scaling
  • Cloud Watch
  • SeMA Deployment Architecture
    • SeMA application sizing-estimation process .
    • SeMA Deployment Architecture
  • Laravel Deployment Architecture
    • Larvel application sizing-estimation process .
    • SeMA Deployment Architecture
  • SeMA Survey Application Deployment Architecture
  • Fawry DevOps internship Agenda
  • Fawry cloud devops internship
  • User Guide
  • FAQ
  • Application Architecture
    • Architecture
    • UI : Angular 8
    • Web : PHP Laravel
    • Analytics : Metabase
    • DB : MariaDB
    • Application Security Course
  • ZiSoft Deployment
    • Non-Production Deployment
    • Kubernetes Production Deployment
    • Offline Production Deployment
    • SaaS :Kubeapps
  • Linux for DevOps
  • Architecture of Linux system
  • Linux Directory Structure
  • Linux Commands
  • Linux labs
  • Docs
  • GIT
  • Git vs SVN
  • Git Flow / Git Branching Model
  • Git Version Control System
  • Git Terminology
  • Git Commands
  • Git Remote
  • Git Stash
  • Git Merge and Merge Conflict
  • Merge vs Rebase
  • Git Tags
  • Containerization
  • Dockerfile
  • Docker Compose
  • Docker Architecture
  • DevOps part 1 : interview
Powered by GitBook
On this page

Was this helpful?

Export as PDF

Git Commands

Last updated 2 years ago

Was this helpful?

Here is a list of most essential Git commands that are used daily.

Let's understand each command in detail.

This command configures the user. The Git config command is the first and necessary command used on the Git command line. This command sets the author name and email address to be used with your commits. Git config is also used in other scenarios.

$ git config --global user.name "ImDwivedi1"

This command is used to create a local repository.

The init command will initialize an empty repository. See the below screenshot.

​

Git Commands

​

This command is used to make a copy of a repository from an existing URL. If I want a local copy of my repository from GitHub, this command allows creating a local copy of that repository on your local directory from the repository URL.

​

​

This command is used to add one or more files to staging (Index) area.

To add more than one file

​

​

Commit command is used in two scenarios. They are as follows.

This command changes the head. It records or snapshots the file permanently in the version history with a message.

  1. 1.

    $ git commit -m " Commit Message"

This command commits any files added in the repository with git add and also commits any files you've changed since then.

​

​

The status command is used to display the state of the working directory and the staging area. It allows you to see which changes have been staged, which haven't, and which files aren?t being tracked by Git. It does not show you any information about the committed project history. For this, you need to use the git log. It also lists the files that you've changed and those you still need to add or commit.

​

​

It is used to upload local repository content to a remote repository. Pushing is an act of transfer commits from your local repository to a remote repo. It's the complement to git fetch, but whereas fetching imports commits to local branches on comparatively pushing exports commits to remote branches. Remote branches are configured by using the git remote command. Pushing is capable of overwriting changes, and caution should be taken when pushing.

Git push command can be used as follows.

This command sends the changes made on the master branch, to your remote repository.

  1. 1.

    $ git push [variable name] master

This command pushes all the branches to the server repository.

​

​

Pull command is used to receive data from GitHub. It fetches and merges changes on the remote server to your working directory.

​

​

This command lists all the branches available in the repository.

​

​

This command is used to merge the specified branch?s history into the current branch.

​

​

This command is used to check the commit history.

​

​

By default, if no argument passed, Git log shows the most recent commits first. We can limit the number of log entries displayed by passing a number as an option, such as -3 to show only the last three entries.

Git Remote command is used to connect your local repository to the remote server. This command allows you to create, view, and delete connections to other repositories. These connections are more like bookmarks rather than direct links into other repositories. This command doesn't provide real-time access to repositories.

​

​

Git Commands
Git Commands
Git Commands
Git Commands
Git Commands
Git Commands
Git Commands
Git Commands
Git Commands
Git Commands