Wednesday, March 27, 2024

Nagios Monitoring Tool

  “It is an open source continuous monitoring tool which monitors network, applications and servers.”

• It allows you to detect and repair problems and mitigate future issues before they affect end-users and customers

• It is developed for monitoring servers, applications and networks

• It provides a centralized view of your entire IT infrastructure and detailed up-to-date status information


Features of Nagios



Nagios Architecture




Learn more about Nagios here :




Installing & Configuring Nagios

 Exercise - Installing & Configuring Nagios

Before beginning the work on Nagios you need to install Nagios

Section 1 – Nagios Installation

1. You must have superuser privileges on the Ubuntu 14.04 server that will run Nagios. Ideally, you will be using a non-root user with superuser privileges.

2. A LAMP stack is also required.

3. Install Apache

sudo apt-get update

sudo apt-get install apache2 You can do a spot check right away to verify that everything went as planned by visiting your server's public IP address in your web browser (see the note under the next heading to find out what your public IP address is if you do not have this information already):

http://your_server_IP_address

You will see the default Ubuntu 14.04 Apache web page

4. Install MySQL

sudo apt-get install mysql-server php5-mysql

sudo mysql_install_db

sudo mysql_secure_installation

You will be asked to enter the password you set for the MySQL root account.

5. Install PHP

sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt

sudo nano /etc/apache2/mods-enabled/dir.conf It will look like this:

<IfModule mod_dir.c>

DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm

</IfModule> 

We want to move the PHP index file highlighted above to the first position after the DirectoryIndexspecification, like this:

<IfModule mod_dir.c>

DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm

</IfModule> 

After this, we need to restart the Apache web server in order for our changes to be recognized. You can do this by typing this:

sudo service apache2 restart

6. Install PHP Modules

sudo apt-get install php5-cli

7. Install Nagios Create Nagios User and Group We must create a user and group that will run the Nagios process. Create a "nagios" user and "nagcmd" group, then add the user to the group with these commands:

sudo useradd nagios

sudo groupadd nagcmd

sudo usermod -a -G nagcmd nagios 


Install Build Dependencies 

Because we are building Nagios Core from source, we must install a few development libraries that will allow us to complete the build. While we're at it, we will also install apache2-utils, which will be used to set up the Nagios web interface. First, update your apt-get package lists:

sudo apt-get update 

Then install the required packages:

sudo apt-get install build-essential libgd2-xpm-dev openssl libssl-dev xinetd apache2-utils unzip 


Let's install Nagios now.

Install Nagios Core Download the source code for the latest stable release of Nagios Core. Go to the Nagios downloads page  and click the Skip to download link below the form. Copy the link address for the latest stable release so you can download it to your Nagios server. 

At the time of this writing, the latest stable release is Nagios 4.1.1. Download it to your home directory with curl:

cd ~

curl -L -O https://assets.nagios.com/downloads/nagioscore/releases/nagios-4.1.1.tar.gz 

Extract the Nagios archive with this command:

tar xvf nagios-*.tar.gz

Then change to the extracted directory:

cd nagios-*

Before building Nagios, we must configure it. If you want to configure it to use postfix (which you can install with apt-get), add --with-mail=/usr/sbin/sendmail to the following command:

 ./configure --with-nagios-group=nagios --with-command-group=nagcmd

Now compile Nagios with this command:

 make all

Now we can run these make commands to install Nagios, init scripts, and sample configuration files:

 sudo make install

 sudo make install-commandmode

 sudo make install-init

 sudo make install-config

 sudo /usr/bin/install -c -m 644 sample-config/httpd.conf /etc/apache2/sites-available/nagios.conf 


In order to issue external commands via the web interface to Nagios, we must add the web server user, www-data, to the nagcmd group:

 sudo usermod -G nagcmd www-data


Install Nagios Plugins Find the latest release of Nagios Plugins here: Nagios Plugins Download. Copy the link address for the latest version, and copy the link address so you can download it to your Nagios server. 

At the time of this writing, the latest version is Nagios Plugins 2.1.1. Download it to your home directory with curl:

cd ~

curl -L -O http://nagios-plugins.org/download/nagios-plugins-2.1.1.tar.gz 

Extract Nagios Plugins archive with this command:

tar xvf nagios-plugins-*.tar.gz 

Then change to the extracted directory:

cd nagios-plugins-* 


Before building Nagios Plugins, we must configure it. Use this command:

./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-openssl 


Now compile Nagios Plugins with this command:

make 

Then install it with this command:

sudo make install


Install NRPE 

Find the source code for the latest stable release of NRPE at the NRPE downloads page. Download the latest version to your Nagios server. At the time of this writing, the latest release is 2.15. Download it to your home directory with curl:

cd ~

curl -L -O http://downloads.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz 

Extract the NRPE archive with this command:

tar xvf nrpe-*.tar.gz 

Then change to the extracted directory:

cd nrpe-* 

Configure NRPE with these commands:

./configure --enable-command-args --with-nagios-user=nagios --with-nagios-group=nagios --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu 

Now build and install NRPE and its xinetd startup script with these commands:

make all

sudo make install

sudo make install-xinetd

sudo make install-daemon-config Open the xinetd startup script in an editor:

sudo vi /etc/xinetd.d/nrpe 


Modify the only_from line by adding the private IP address of the your Nagios server to the end (substitute in the actual IP address of your server):

only_from = 127.0.0.1 10.132.224.168

Save and exit. Only the Nagios server will be allowed to communicate with NRPE. Restart the xinetd service to start NRPE:

sudo service xinetd restart 

Now that Nagios 4 is installed, we need to configure it. Configure Nagios Now let's perform the initial Nagios configuration. You only need to perform this section once, on your Nagios server. Organize Nagios Configuration Open the main Nagios configuration file in your favorite text editor. We'll use vi to edit the file:

sudo vi /usr/local/nagios/etc/nagios.cfg 

Now find an uncomment this line by deleting the #:

#cfg_dir=/usr/local/nagios/etc/servers 

Save and exit. 

Now create the directory that will store the configuration file for each server that you will monitor:

sudo mkdir /usr/local/nagios/etc/servers 

Configure Nagios Contacts Open the Nagios contacts configuration in your favorite text editor. We'll use vi to edit the file:

sudo vi /usr/local/nagios/etc/objects/contacts.cfg 

Find the email directive, and replace its value (the highlighted part) with your own email address:

email nagios@localhost ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******

Save and exit. 

Configure check_nrpe Command

Let's add a new command to our Nagios configuration:

sudo vi /usr/local/nagios/etc/objects/commands.cfg 

Add the following to the end of the file:

define command{

command_name check_nrpe

command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$

}

 Save and exit. This allows you to use the check_nrpe command in your Nagios service definitions. Configure Apache Enable the Apache rewrite and cgi modules:

sudo a2enmod rewrite

sudo a2enmod cgi 

Use htpasswd to create an admin user, called "nagiosadmin", that can access the Nagios web interface:

sudo htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin 

Enter a password at the prompt. Remember this password, as you will need it to access the Nagios web interface. 

Note: If you create a user that is not named "nagiosadmin", you will need to edit /usr/local/nagios/etc/cgi.cfg and change all the "nagiosadmin" references to the user you created. Now create a symbolic link of nagios.conf to the sites-enabled directory:

sudo ln -s /etc/apache2/sites-available/nagios.conf /etc/apache2/sites-enabled/ Nagios is ready to be started. 

Let's do that, and restart Apache:

sudo service nagios start

sudo service apache2 restart

In case Nagios service does not start follow these steps: 

sudo vi /etc/systemd/system/nagios.service 

and added the following: [Unit] Description=Nagios BindTo=network.target

[Install] WantedBy=multi-user.target [Service] User=nagios Group=nagios Type=simple ExecStart=/usr/local/nagios/bin/nagios /usr/local/nagios/etc/nagios.cfg

Then the following: sudo systemctl enable /etc/systemd/system/nagios.service sudo systemctl start nagios sudo systemctl restart nagios

Accessing the Nagios Web Interface Open your favorite web browser, and go to your Nagios server (substitute the IP address or hostname for the highlighted part):

http://nagios_server_public_ip/nagios 

Because we configured Apache to use htpasswd, you must enter the login credentials that you created earlier. We used "nagiosadmin" as the username: After authenticating, you will be see the default Nagios home page. Click on the Hosts link, in the left navigation bar, to see which hosts Nagios is monitoring:

As you can see, Nagios is monitoring only "localhost", or itself. Let's monitor another host with Nagios! Monitor a Host with NRPE In this section, we'll show you how to add a new host to Nagios, so it will be monitored. Repeat this section for each server you wish to monitor. On a server that you want to monitor, update apt-get:

sudo apt-get update

Now install Nagios Plugins and NRPE:

sudo apt-get install nagios-plugins nagios-nrpe-server Configure Allowed Hosts Now, let's update the NRPE configuration file. Open it in your favorite editor (we're using vi):

sudo vi /etc/nagios/nrpe.cfg

... and add Nagios Server IP 192.168.1.9 to the server_address.

server_address=192.168.1.9

Find the allowed_hosts directive, and add the private IP address of your Nagios server to the comma-delimited list (substitute it in place of the highlighted example):

allowed_hosts=127.0.0.1,10.132.224.168

Save and exit. This configures NRPE to accept requests from your Nagios server, via its private IP address. Configure Allowed NRPE Commands Look up the name of your root filesystem (because it is one of the items we want to monitor):

df -h / We will be using the filesystem name in the NRPE configuration to monitor your disk usage (it is probably /dev/vda). Now open nrpe.cfg for editing:

sudo vi /etc/nagios/nrpe.cfg

The NRPE configuration file is very long and full of comments. There are a few lines that you will need to find and modify: 

 server_address: Set to the private IP address of this host 

 allowed_hosts: Set to the private IP address of your Nagios server 

 command[check_hda1]: Change /dev/hda1 to whatever your root filesystem is called The three aforementioned lines should look like this (substitute the appropriate values):

server_address=client_private_IP

allowed_hosts=nagios_server_private_IP

command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /dev/vda Note that there are several other "commands" defined in this file that will run if the Nagios server is configured to use them. Also note that NRPE will be listening on port 5666 because server_port=5666 is set. 

If you have any firewalls blocking that port, be sure to open it to your Nagios server. Save and quit. Restart NRPE Restart NRPE to put the change into effect:

sudo service nagios-nrpe-server restart

Once you are done installing and configuring NRPE on the hosts that you want to monitor, you will have to add these hosts to your Nagios server configuration before it will start monitoring them. Add Host to Nagios Configuration On your Nagios server, create a new configuration file for each of the remote hosts that you want to monitor in /usr/local/nagios/etc/servers/. Replace the highlighted word, "yourhost", with the name of your host:

sudo vi /usr/local/nagios/etc/servers/yourhost.cfg

Add in the following host definition, replacing the host_name value with your remote hostname ("web-1" in the example), the alias value with a description of the host, and the address value with the private IP address of the remote host:

define host {

use linux-server

host_name yourhost

alias My first Apache server

address 10.132.234.52

max_check_attempts 5

check_period 24x7

notification_interval 30

notification_period 24x7

} 

With the configuration file above, Nagios will only monitor if the host is up or down. If this is sufficient for you, save and exit then restart Nagios. If you want to monitor particular services, read on. Add any of these service blocks for services you want to monitor. Note that the value of check_command determines what will be monitored, including status threshold values. Here are some examples that you can add to your host's configuration file: Ping:

define service {

use generic-service

host_name yourhost

service_description PING

check_command check_ping!100.0,20%!500.0,60%

} SSH (notifications_enabled set to 0 disables notifications for a service):

define service {

use generic-service

host_name yourhost

service_description SSH

check_command check_ssh

notifications_enabled 0

} 


If you're not sure what use generic-service means, it is simply inheriting the values of a service template called "generic-service" that is defined by default.

And now check the configuration: /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

... to see if the configuration is correct.

Now save and quit. Reload your Nagios configuration to put any changes into effect: Sudo service apache2 restart sudo service nagios restart

sudo service nagios reload

Once you are done configuring Nagios to monitor all of your remote hosts, you should be set. Be sure to access your Nagios web interface, and check out the Services page to see all of your monitored hosts and services:


Section 2 – Capstone Exercise

Step 1

Start your Google Compute Engine virtual machine and connect to it using SSH.

sudo ls /usr/local/nagios/etc/servers

sudo nano /usr/local/nagios/etc/servers/devops-host.cfg


Step 2

Add code

define service {

use generic-service

host_name devops-host

service_description CHECKJAVA

check_command check_java

notifications_enabled 0

}

define service 

{

use generic-service

host_name devops-host

service_description CHECKTOMCAT

check_command check_tomcat

notifications_enabled 0

}

define service 

{

use generic-service

host_name devops-host

service_description CHECKTOMCATAPP

check_command check_TomcatApplication -u admin -p admin -h http://localhost -P $

notifications_enabled 0

}


Step 3

Save the file and exit.


Step 4

sudo service apache 2 restart

sudo service nagios restart


Step 5

Go to your browser and open the Nagios page

http://nagios_server_public_ip/nagios 

Nagios Plugins

 • Plugins are compiled executables or scripts(Perl or non-Perl) that extends Nagios functionality to monitor servers and hosts

• Nagios will execute a Plugin to check the status of a service or host

• Nagios can be compiled with support for an embedded Perl interpreter to execute Perl plugins

• Without it, Nagios executes Perl and non-Perl plugins by forking and executing the plugins as an external command


Nagios Remote Plugin Executor (NRPE)

• NRPE allows you to remotely execute Nagios plugins on other Linux/Unix machines. This allows you to monitor remote machine metrics such as disk usage, CPU load etc

• It can communicate with some of the Windows agent addons, so you can execute scripts and check metrics on remote Windows machines as well


Nagios Remote Data Processor

• Nagios Remote Data Processor (NRDP) is an agent which allows flexible data transport

• It uses standard protocols such as: https:// , XML 


Notifications in Nagios

 • The decision to send out notifications is made in the service check and host check logic

• Each host and service definition has a <contact_groups> option that specifies what contact groups receive notifications for that particular host or service

• There are several filters that notifications encounters before reaching to the receiver


Prerequisites for delivering notification

 Nagios supports optional detection of hosts and services that are "flapping"

 Flapping occurs when a service or host changes state too frequently, resulting a problem and recovery notifications


Nagios Notification Methods

• There are many ways through which Nagios notifies about a problem or recovery Example: Mail, Instant message, Audio alert etc.

• How notifications are sent depend on the notification commands that are defined in your object definition files

• While writing your notification commands, you need to take into account what type of notification is occurring

• The $NOTIFICATIONTYPE$ macro (macroinstruction)contains a string that identifies the type of notification occurring


Program Wide Filters

• Filter to test of whether or not notifications are enabled on a program-wide basis

• This is initially determined by the enable_notifications directive in the main config file

• If notifications are disabled on a program-wide basis, no host or service notifications can be sent out or else notifications move to the next filter


Service & Host Filters

• This filter is a check to see if

• The host or service is in a period of scheduled downtime

• The host or service is flapping

• Notifications can be sent out for warning states, critical states, and recoveries

• Notifications fall in valid notification time period

• Scheduled downtime- Scheduled periods of planned downtime for hosts and service that you're monitoring.

• This is an event of taking a server down for an upgrade, etc.


Contact Filter

 At this point the notification has passed the program mode filter and all host or service filters and Nagios starts to notify all the people it should

 Contact filters are specific to each contact and do not affect other contacts receive notifications

Nagios GUI Web Console

  


Nagios Server : Hosts


Nagios Server : Services



Git

 Git is an open source Distributed Version Control System(DVCS) which records changes made to the files laying emphasis on speeddata integrity and distributednon-linear workflows.


Essential Glossary for handling Pull Request 

Branch

A branch is a parallel version of a repository. It is contained within the repository, but does not affect the primary or master branch allowing you to work freely without disrupting the "live" version. When you've made the changes you want to make, you can merge your branch back into the master branch to publish your changes.  

Branch restriction
A restriction that repository admins can enable so that only certain users or teams can push or make certain changes to the branch.

Checkout
You can use git checkout on the command line to create a new branch, change your current working branch to a different branch, or even to switch to a different version of a file from a different branch with git checkout [branchname] [path to file]. The "checkout" action updates all or part of the working tree with a tree object or blob from the object database, and updates the index and HEAD if the whole working tree is pointing to a new branch. 

Clone 
A clone is a copy of a repository that lives on your computer instead of on a website's server somewhere, or the act of making that copy. When you make a clone, you can edit the files in your preferred editor and use Git to keep track of your changes without having to be online. The repository you cloned is still connected to the remote version so that you can push your local changes to the remote to keep them synced when you're online.
  
Commit
A commit, or "revision", is an individual change to a file (or set of files). When you make a commit to save your work, Git creates a unique ID (a.k.a. the "SHA" or "hash") that allows you to keep record of the specific changes committed along with who made them and when. Commits usually contain a commit message which is a brief description of what changes were made. 

Pull
Pull refers to when you are fetching in changes and merging them. For instance, if someone has edited the remote file you're both working on, you'll want to pull in those changes to your local copy so that it's up to date. See also fetch. 

Pull request
Pull requests are proposed changes to a repository submitted by a user and accepted or rejected by a repository's collaborators. Like issues, pull requests each have their own discussion forum. 

Push
To push means to send your committed changes to a remote repository on GitHub.com. For instance, if you change something locally, you can push those changes so that others may access them.

Benefits of Using Git

  • History Tracking: Git allows you to track every change made in your project, including: who made the change and when it was made.
  • Collaboration: Multiple developers can be able work on the same project at the same time, and Git efficiently manages the merging of changes in code.
  • Branching and Merging: Git enables developers to create branches to work on new features or bug fixes and later merge them back into the main codebase.
  • Offline Work: Git works offline, which means you can commit changes and work on your project even without an internet connection.
  • Git Installation Commands

    Here are the Git installation commands for different operating systems:

    Commands

    Description

    Git for Windows stand-alone installer. 
    $ brew install gitInstall Git with Homebrew on Mac OS
    $ sudo port selfupdateInstall Git with MacPorts on Mac OS
    $ sudo apt-get install gitInstall Command for Linux
    $ git –versionShows the current version of your Git

    Git Configuration & Setup

    Here are Git configuration and setup commands:

    Commands 

    Description

    git config –global user.name “Your Name”Set your username globally.
    git config –global user.email “youremail@example.com”Set your email globally.
    git config –global color.ui auto –Set to display colored output in the terminal
    git helpDisplay the main help documentation, showing a list of commonly used Git commands.

    Initializing a Repository  

    Here are the Git initializing a repository commands:

    Commands 

    Description

    git initInitializes a new Git repository in the current directory.
    git init <directory>Creates a new Git repository in the specified directory.
    git clone <repository_url>this Clones a repository from a remote server to your local machine.
    git clone –branch <branch_name> <repository_url>Clones a specific branch from a repository.

    Basic Git Commands

    Here are some basic Git commands:

    Commands 

    Description

    git add <file>Adds a specific file to the staging area.
    git add . or git add –allAdds all modified and new files to the staging area.
    git statusShows the current state of your repository, including tracked and untracked files, modified files, and branch information.
    git status –ignoredDisplays ignored files in addition to the regular status output.
    git diffShows the changes between the working directory and the staging area (index).
    git diff <commit1> <commit2>Displays the differences between two commits.
    git diff –staged or git diff –cachedDisplays the changes between the staging area (index) and the last commit.
    git diff HEADDisplay the difference between the current directory and the last commit
    git commitCreates a new commit with the changes in the staging area and opens the default text editor for adding a commit message.
    git commit -m “<message>” or git commit –message “<message>”Creates a new commit with the changes in the staging area and specifies the commit message inline.
    git commit -a or git commit –allCommits all modified and deleted files in the repository without explicitly using git add to stage the changes.
    git notes addCreates a new note and associates it with an object (commit, tag, etc.).
    git restore <file>Restores the file in the working directory to its state in the last commit.
    git reset <commit>Moves the branch pointer to a specified commit, resetting the staging area and the working directory to match the specified commit.
    git reset –soft <commit>Moves the branch pointer to a specified commit, preserving the changes in the staging area and the working directory.
    git reset –hard <commit>Moves the branch pointer to a specified commit, discarding all changes in the staging area and the working directory, effectively resetting the repository to the specified commit.
    git rm <file>Removes a file from both the working directory and the repository, staging the deletion.
    git mvMoves or renames a file or directory in your Git repository.

    Also, checkBasic Git Commands with Examples

    Git Commit (Updated Commands)

    Here are some of the updated commands for Git commit:

    Commands 

    Description

    git commit -m “feat: message”Create a new commit in a Git repository with a specific message to indicate a new feature commit in the repository.
    git commit -m “fix: message”Create a new commit in a Git repository with a specific message to fix the bugs in codebases
    git commit -m “chore: message”Create a new commit in a Git repository with a specific message to show routine tasks or maintenance.
    git commit -m “refactor: message”Create a new commit in a Git repository with a specific message to change the code base and improve the structure.
    git commit -m “docs: message”Create a new commit in a Git repository with a specific message to change the documentation.
    git commit -m “style: message”Create a new commit in a Git repository with a specific message to change the styling and formatting of the codebase.
    git commit -m “test: message”Create a new commit in a Git repository with a specific message to indicate test-related changes.
    git commit -m “perf: message”Create a new commit in a Git repository with a specific message to indicate performance-related changes.
    git commit -m “ci: message”Create a new commit in a Git repository with a specific message to indicate the continuous integration (CI) system-related changes.
    git commit -m “build: message”Create a new commit in a Git repository with a specific message to indicate the changes related to the build process.
    git commit -m “revert: message”Create a new commit in a Git repository with a specific message to indicate the changes related to revert a previous commit.

    Branching and Merging

    Here are some Git branching and merging commands:

    Commands 

    Description

    git branchLists all branches in the repository.
    git branch <branch-name>Creates a new branch with the specified name.
    git branch -d <branch-name>Deletes the specified branch.
    git branch -aLists all local and remote branches.
    git branch -rLists all remote branches.
    git checkout <branch-name>Switches to the specified branch.
    git checkout -b <new-branch-name>Creates a new branch and switches to it.
    git checkout — <file>Discards changes made to the specified file and revert it to the version in the last commit.
    git merge <branch>Merges the specified branch into the current branch.
    git logDisplays the commit history of the current branch.
    git log <branch-dDisplays the commit history of the specified branch.
    git log –follow <file>Displays the commit history of a file, including its renames.
    git log –allDisplays the commit history of all branches.
    git stashStashes the changes in the working directory, allowing you to switch to a different branch or commit without committing the changes.
    git stash listLists all stashes in the repository.
    git stash popApplies and removes the most recent stash from the stash list.
    git stash dropRemoves the most recent stash from the stash list.
    git tagLists all tags in the repository.
    git tag <tag-name>Creates a lightweight tag at the current commit.
    git tag <tag-name> <commit>Creates a lightweight tag at the specified commit.
    git tag -a <tag-name> -m “<message>”Creates an annotated tag at the current commit with a custom message.

    Remote Repositories

    Here are some Git remote repositories commands:

    Commands 

    Description

    git fetchRetrieves change from a remote repository, including new branches and commit.
    git fetch <remote>Retrieves change from the specified remote repository.
    git fetch –pruneRemoves any remote-tracking branches that no longer exist on the remote repository.
    git pullFetches changes from the remote repository and merges them into the current branch.
    git pull <remote>Fetches changes from the specified remote repository and merges them into the current branch.
    git pull –rebaseFetches changes from the remote repository and rebases the current branch onto the updated branch.
    git pushPushes local commits to the remote repository.
    git push <remote>Pushes local commits to the specified remote repository.
    git push <remote> <branch>Pushes local commits to the specified branch of the remote repository.
    git push –allPushes all branches to the remote repository.
    git remoteLists all remote repositories.
    git remote add <name> <url>Adds a new remote repository with the specified name and URL.

    Git Comparison

    Here are some Git comparison commands:

    Commands 

    Description

    git showShows the details of a specific commit, including its changes.
    git show <commit>Shows the details of the specified commit, including its changes.

    Git Managing History

    Here are some Git managing history commands:

    Commands 

    Description

    git revert <commit>Creates a new commit that undoes the changes introduced by the specified commit.
    git revert –no-commit <commit>Undoes the changes introduced by the specified commit, but does not create a new commit.
    git rebase <branch>Reapplies commits on the current branch onto the tip of the specified branch.

    Why use Git?

    Here are some of the reasons why you might want to use Git:

    • Track changes to your code
    • Collaborate on projects with others
    • Maintain an organized code history
    • Easily revert to previous versions when needed
    • Release your code efficiently and manage versions
    • Enhance productivity and code integrity in software development.

    Conclusion

    In conclusion, This Git Cheat Sheet is thoughtfully organized and categorized, making it easy for developers to quickly find the commands they need for specific use cases. Whether it’s configuring and setting up Git, creating and managing projects, taking snapshots, branching and merging, sharing and updating, comparing changes, or managing version history, the Git Cheat Sheet covers it all.

    By utilizing this resource, developers can enhance their productivity and efficiency in working with Git, ultimately leading to smoother and more successful software development projects.

  • Different Types of Reports in Scrum - Agile

      Agile Reporting 1. Sprint Burndown At a Sprint-level, the burndown presents the  easiest way to track and report status  (the proverbial  ...