Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 6

Git:

Git is a free and open source distributed version control system designed to handle
everything
from small to very large projects with speed and efficiency.
*Git allows a team to work together, where they use the same files.
And it helps the team easier to finish the project

version control git:


Version control software allows the user to have “versions” of a project, which
show
the changes that were made to the code over time, and allows the user to go back if
necessary and undo those changes.

Characteristics of git / use of git:


Git provides each developer a local copy of the entire development history,
and changes are copied from one such repository to another., that makes easier

enables the use of IDE plugins to access Git repositories like pycharm , visual
studio.

Git is very fast and scalable.

INSTALL GIT ON LINUX:


sudo apt-get update
sudo apt-get install git
git --version
git config --global user.name "Emma Paris"
git config --global user.email "eparis@atlassian.com"
Git packages can be install via both yum and dnf
(DNF is a software package manager that installs, updates,
and removes packages on RPM-based Linux distributions)
(yum is a software package manager that installs, updates, and removes packages on
RPM-based systems.)

CLONE: git clone https://git.kernel.org/pub/scm/git/git.git

INITIALIZE REPOS:
mnelson:Desktop mnelson$ cd ~/Desktop
mnelson:Desktop mnelson$ mkdir myproject
mnelson:Desktop mnelson$ cd myproject/
mnelson:myproject mnelson$ git init

ADD NEW FILES TO REPO:


mnelson:myproject mnelson$ "touch" mnelson.txt (touch command)

TO KNOW STATUS(tracked or untracked)


"git status" command to see which files git knows exist.

TO ADD FILE TO COMMIT:


git add <filename> command

COMMIT:
git commit command.

CREATE A NEW BRANCH:


For instance, if we want to add a new page to our website we can create a new
branch
just for that page without affecting the main part of the project.
Once done with the page,we can merge changes branch into the primary branch.
"git checkout -b <my branch name>" This command will automatically create a new
branch
"git branch" command to confirm that your branch was created

REPOSITORY ON GIT:
Create repository - Existing or empty
push an existing repository from the command line' section:
"git push origin" my-new-branch

A PULL REQUEST:(or PR) is a way to alert a repo's owners that you want to make some
changes to their code.
Merge pull request:This will merge your changes into the primary branch.

"git log" command again to see all new commits.

REMOVE FILE FROM REPO:


"git rm OldBook.rtf"

RENAMING A FILE:
mv Book3.rtf Appendix.rtf
Then rm>> remove book3 , add>> add appen

UNDO COMMIT:
git log --oneline
Once you know the hash for the commit you want to undo,
git revert 2f5451f --no-edit (hash number)

RELEASE AND TAGS:


people with write access to a repository can create, edit, and delete a release.

Versions are based on Git tags.


unstable, select This is a pre-release.

Creating a release
Editing a release
Deleting a release
-----------------------------------------------------------------------------------
LINUX COMMAN LINES:
LS = Allows you to view a list of the files and folders in a given directory.

TOUCH = The touch command is a standard command used in UNIX/Linux operating


system which is used to create, change and modify timestamps of a file.

CAT(concatenate)= command is very frequently used in Linux.


It reads data from the file and gives their content as output.

MKDIR = mkdir command in Linux allows the user to create directories


(also referred to as folders in some operating systems ).

RM = The rm command is used to delete files.

RMDIR = command is used remove empty directories from the filesystem in Linux.

GREP = The grep filter searches a file for a particular pattern of characters,
and displays all lines that contain that pattern

CP = cp stands for copy. This command is used to copy files or group of files or
directory.
MV = The mv command moves files and directories from one directory to another, or
renames a file or directory
-----------------------------------------------------------------------------------
---------
MOUNT COMMAND:
The mount command mounts a storage device or filesystem,
making it accessible and attaching it to an existing directory structure.

The umount command "unmounts" a mounted filesystem,


informing the system to complete any pending read or write operations, and safely
detaching it.
-----------------------------------------------------------------------------------
------------------------
FILE SYSTEM COMPONENTS IN LINUX:A File System is a way of storing content inside a
disk partition
Space management.
Filenames.
Directories.
Metadata.
File system as an abstract user interface.
Utilities.
Restricting and permitting access.
Maintaining integrity.
-----------------------------------------------------------------------------------
-------------------------
Types of Linux File System:
Linux offers many file systems such as
Ext, Ext2, Ext3, Ext4, JFS, ReiserFS, XFS, btrfs, and swap.
-----------------------------------------------------------------------------------
---------------------
PARTITION:
fdisk, Disk Druid partitioning tool that can manage and create Linux partition
WE MUST create partitions first, before creating file systems inside them.
-----------------------------------------------------------------------------------
----------------------
DEVICE NAMES:
The first floppy drive is named /dev/fd0 .
The second floppy drive is named /dev/fd1 .
The first SCSI disk (SCSI ID address-wise) is named /dev/sda .
The second SCSI disk (address-wise) is named /dev/sdb , and so on.
The first SCSI CD-ROM is named /dev/scd0 , also known as /dev/sr0 .
-----------------------------------------------------------------------------------
------------------------
ADMINISTRATION :
usermod and gpasswd
and most commonly used is SUDO
-----------------------------------------------------------------------------------
--------------------------
SECURITY:
There are three access types (read, write, execute)

TAPE ARCHIVE PROGRAM:


TAR is an archive file format and is some version of the Tape ARchiving utility.
It is an archiving program that is designed to store and extract files from an
archive file known as a tar file,

SHELL SCRIPTING:
shell scripting is set of commands that are used to communicate with the system.
A shell script is usually created for commandsequences
it will save time for repeative tasks.

PEMISSION GROUPS:
Permission Description
Owner Permissions used by the assigned owner of the file or directory
Group Permissions used by members of the group that owns the file or directory
Other Permissions used by all users other than the file owner, and members of the
group that
owns the file or the directory

Run Levels:A run level is a state of init and the whole system that defines what
system services are operating.
-----------------------------------------------------------------------------------
------------------------------
MANAGING USERS IN LINUX:
adduser : add a user to the system.
userdel : delete a user account and related files.
addgroup : add a group to the system.
delgroup : remove a group from the system.
usermod : modify a user account.
chage : change user password expiry information.

MySQL is a relational database management system based on SQL – Structured Query


Language.
The application is used for a wide range of purposes,
including data warehousing, e-commerce, and logging applications.
-----------------------------------------------------------------------------------
----------------------------
RDBMS:"Relational Database Management System." An RDBMS is a DBMS designed
specifically for relational databases.
-----------------------------------------------------------------------------------
-----------------------------
RDBMS VS DBMS:
In DBMS, the data is stored as a file,
while in RDBMS, the information is stored in tables.
-----------------------------------------------------------------------------------
------------------
DBMS can only be used by one single user,
whereas multiple users can use RDMBS.

DBMS does not support client-server side interaction.


Client-server side interaction and architecture are only supported in RDBMS
-----------------------------------------------------------------------------------
----------
SQL: SQL statements are used to perform tasks such as update data on a database, or
retrieve data from a database.
-------------------------------------------------------------------------------
Query optimization: is when a developer, or the database engine,
changes a query in such a way that SQL Server is able to return the same results
more efficiently.
-----------------------------------------------------------------------------------
-----------------
CREATE DATABASE & SHOW DATA BASE
CREATE DATABASE [IF NOT EXISTS] database_name. >> CREATE DATABASE

mysql> SHOW DATABASES; >> SHOW DATABASES CREATED

USE TESTDB; >> access the newly created database


---------------------------------
DDL – Data Definition Language
CREATE , DROP , ALTER - TRUNCATE - COMMENT - RENAME

DQl – Data Query Language


SELECT

DML – Data Manipulation Language


INSERT - UPDATE - DELETE

DCL – Data Control Language


GRANT - REVOKE

TCL(transaction Control Language):


COMMIT - ROLLBACK - SAVEPOINT - SET TRANSACTION

JOIN CLAUSE:
A JOIN clause is used to combine rows from two or more tables into one table.

-----------------------------------------------------------------------------------
---------
APACHE WEB SERVER:
Apache HTTP Server is a free and open-source web server that delivers web content
through the internet.
The way Apache HTTP server works is that it will accept requests from the web
browser,
such as Google Chrome and Microsoft Edge, and turn programming scripts into web
pages
which contents are visible by the visitors

SSI (SERVER SIDE INCLUDES):Server-side includes (SSI) are a mechanism for employing
the web server to perform tasks
like displaying files as part of other files or displaying information like the URL
of web pages or dates and times
dynamically.
-----------------------------------------------------------------------------------
--------------------
PHP?:
PHP is an acronym for "PHP: Hypertext Preprocessor"
PHP is a widely-used, open source scripting language
PHP scripts are executed on the server
-------------------------------------------------------------------------------
PHP IDENTIFIERS:Identifier is a general term applied to variables, functions, and
various other userdefined objects.
*Identifiers are case sensitive.
*Identifiers can be any length.
-----------------------------------
PHP DATA TYPES:
data types:

String
Integer
Float (floating point numbers - also called double)
Boolean
Array
Object
NULL
Resource
-------------------------------
PHP operators:

Arithmetic operators
Assignment operators
Comparison operators
Increment/Decrement operators
Logical operators
String operators
Array operators
Conditional assignment operators
---------------------------------------
PHP INSERT DATA TO SQL - "INSERT INTO"
TO FETCH DATA FROM SQL -mysql_fetch_array()
=-------------------------------------------------------
PERL - Perl is a general-purpose programming language originally developed for text
manipulation
and now used for a wide range of tasks including system administration,web
development,network programming,GUI development

You might also like