2 Git PDF
2 Git PDF
=======================
This is the process of maintianing multiple versions of the code
All the team members uplaod their code(check in) into the remote
version controlling system.The VCS accepts the code uplaods from
multiple team members and integrates it so that when the other
team members download the code they will be able to see the
entire work donw by the team.
VCS's also preserve older and later versions of the code so that
at any time we can switch between which ever version we want
================================================================
================================================================
2 Install it
================================================================
Setting up git in ubuntu linux servers
--------------------------------------------
1 Update the apt repository
sudo apt-get update
2 Install git
sudo apt-get install -y git
----------------------------------------------------------------
Configuring user and email globally for all users on a system
git config --global user.name "sai krishna"
git config --global user.email "intelliqittrainings@gmail.com"
----------------------------------------------------------------
On the local machine git uses three sections
1 Working directory
2 Stagging Area
3 Local repository
================================================================
Day 2
================================================================
Branching in Git
========================
This is a feature of git using which we can create seperate
branches for different functionalites and later merge them with
the main branch also known as the master branch.This will help
in creating the code in an uncluttered way
6 To merge a branch
git merge branch_name
================================================================
================================================================
git clone
===============
This will download all the code from the remote repository
into the local repository and it is generally used only once
when all the team members want a copy of the same code
git fetch
==================
This will download only the modified files but it will place
them on a seperate branch called as "remote branch",we can go
into this remote branch check if the modificatios are accpetable
and then merge it with the main branch
================================================================
Git Merge
===============
Merging always happens bases on the time stamps of the commits
================================================================
Git rebase
===================
This is called as fastforward merge where the commits coming
from a branch are projected as the top most commits on master
branch.
================================================================
Git Cherrypicking
=========================
This is used to selectively pick up certain commits and add them
to the master branch
===============================================================
Git reset
==============
This is a command of git using which we can toggle between
multiple versions of git and access whichever version we want
================================================================
Git reset
==============
This is a command of git using which we can toggle between
multiple versions of git and access whichever version we want
----------------------------------------------------------------
Soft reset will also move the head to an older commit but
we will see the condition of the git repository as just one
step prior to the c commit ie; the files will be seen in the
stagging area.
================================================================
Git stashing
======================
Stash is a section of git into which once the files are pushed
git cannot access them
================================================================
Git sqaush
==============
This is the process of merging multiple commits and making
it look like a single commit.This can be done using the git
rebase command
2 To squash
git rebase -i HEAD~5
This will open the top 5 commits in vi editor
For which ever commits we want to perform a squash opration
remove the word "pick" and replace it with "squash"
================================================================
================================================================
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 (Token password)github