Академический Документы
Профессиональный Документы
Культура Документы
- VEERESH H R
About Git
It is designed to handle everything from small to very large projects with speed and
efficiency.
What is Version Control?
You can think of a version control system (short: "VCS") as a kind of "database". It lets you save a
snapshot of your complete project at any time you want. When you later take a look at an older
snapshot (let's start calling it "version"), your VCS shows you exactly how it differed from the
previous one.
Version control is independent of the kind of project / technology / framework you're working
with:
● It works just as well for an HTML website as it does for a design project or an iPhone app
It lets you work with any tool you like;
● it doesn't care what kind of text editor, graphics program, file manager or other tool you
use Also, don't confuse a VCS with a backup or a deployment system.
You don't have to change or replace any other part of your tool chain when you start using
version control. A version control system records the changes you make to your project's files.
This is what version control is about. It's really as simple as it sounds.
Why Use a Version Control System?
Collaboration
Backup
KEYWORDS
GIT WORKFLOW
How to install Git ?
Installation of Git on Linux Ubuntu OS
● You can check your current version of Git by running the command in a
terminal.
git --version
● You can confirm that you have installed Git correctly by running the
following command
git --version
● After installing Git make sure your username and email address are set
correctly.
● If your name and email are not listed in the output, use the following
commands to set them manually.
https://www.youtube.com/watch?v=t7pasiwt-Yw
https://www.youtube.com/watch?v=LK0vMt_lEbQ
https://www.atlassian.com/git/tutorials/install-git
Basic Commands
pwd : command prints the absolute path to current working directory.
cd : changes directory.
git reset HEAD new.txt : unstages from staging index to working index.
git checkout --new.txt : to remove all the changes of the file until last commit.
git pull origin master : The "push" command is used to publish new local commits on a
remote server.
git push origin master : To get the code from the remote server.
git show shaId : Shows the difference between latest commit and prior to latest one.
git diff HEAD : shows the difference between working index and latest commit.
git diff : shows the difference between working index and staging index.
git diff --staged : shows the difference between staging index and latest commit.
git diff shaId1 shaId2 : shows the difference between two commits.
git diff head head^ : Difference between HEAD and HEAD-1 commit.
Conflict Resolution
LEARNING GIT
● Git website: https://git-scm.com/
● Git tutorial : https://www.git-tower.com/learn/git/ebook/en/command-line/introduction
● Udemy free course on Git :
https://www.udemy.com/course/git-and-github-crash-course-creating-a-repository-from-scratch/
● Udemy Git: Become an Expert : https://www.udemy.com/course/git-expert-4-hours/
● Free online book: https://git-scm.com/book/en/v2
● Reference page for Git: https://services.github.com/index.html
● Git tutorial: http://schacon.github.com/git/gittutorial.html
● Git for Computer Scientists: https://eagain.net/articles/git-for-computer-scientists/
Thank you for your
valuable time.
VEERESH H R