DEV Community

Cover image for Git & GitHub
Arya Krishna
Arya Krishna

Posted on

Git & GitHub

What is DevOps?
DevOps is nothing but a culture that helps the development team and operations team to work together. The idea is to continuously develop the code and test them alongside. There will be continuous integration taking place, meaning no matter where you are in the deployment lifecycle, your code is being continuously tested. There will be continuous releases since the operations team will keep deploying the code to the production environment.

That is a lot of continuous in one paragraph!! In short DEVOps allows better collaboration, increased trust and faster software releases.

Tools in DevOps

DevOps is split in to 2 areas - The Development and Operation environment.

In the Dev side you have - Building, Code, Planning, And Testing. And in the Op side you have Release, Deployment, Operating & Monitoring.

Source Code Management Tools like SVN(previously used centralized version control system),TVS or Team Foundation Service (distributed under the trailware license for issue tracking and document management), Git (open source distributed version control system).

What is Git ?
Git is a version control system for tracking changes in Computer files. It is generally used for source code management in Software development.

  • Changes can be tracked in the source code
  • Distributed version control tool used for source code management
  • Allows multiple developers to work together
  • Supports non linear development because of it's thousands of parallel branches

*Features of Git *

  • It is free and open source
  • Tracks History
  • Like mentioned earlier Git supports non linear development
  • It is incredibly scalable
  • It is collaborative and branching becomes so easier

Git Workflow

Image description

Typically you start off having the working directory locally and you stage those files in to a staging area. And then you commit the changes to your git repository. These are the changes that you commit locally on your computer. Finally you push those changes and there by your code becomes available to all the developers working on that project.

There is also the concept of branching that comes in to play when we talk about pushing the code. Branch in git is used to keep your changes until they are ready. You can do your work on a branch while the master branch remains stable. Once your work is completed you can merge your changes to the master branch.

*Git Commands *

  • git init - Create repositories in your local computer
  • git add - Adds a change in the working directory to the staging area
  • git commit -captures a snapshot of the project's currently staged changes
  • git status -displays the state of the working directory and the staging area
  • git branch - List, create, or delete branches
  • git merge - Join two or more development histories together
  • git rebase - he process of moving or combining a sequence of commits to a new base commit
  • git push - used to upload local repository content to a remote repository
  • git pull - used to fetch and download content from a remote repository and immediately update the local repository to match that content
  • git origin - a shorthand name for the remote repository that a project was originally cloned from

Top comments (0)