2.git Word
2.git Word
Version Controlling
===================
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(check out) the code they will be able to
see the entire work done 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
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 "[email protected]"
----------------------------------------------------------------
On the local machine git uses three sections
1 Working directory
2 Stagging Area
3 Local repository
3 To create a branch
git branch branch_name
4 To move into a branch
git checkout branch_name
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.
----------------------------------------------------------------
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 squash:
==========
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
================================================================
================================================================
COMMANDS OF TAGS:
================
list of tags
git tag
Delete tag
git tag –d Release-1.0
================================================================