Git session 1
-
Upload
hassan-khan -
Category
Technology
-
view
31 -
download
0
Transcript of Git session 1
![Page 1: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/1.jpg)
+
Source Code Management
![Page 2: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/2.jpg)
+What will we learn ?
Any thing that lies between managing our code efficiently
locally and on the server
![Page 3: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/3.jpg)
+Why Git ?
![Page 4: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/4.jpg)
+Why Git ?
Because we use it here
in Cygnis
![Page 5: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/5.jpg)
+Learning Strategy
We will start from very basic
Use a practical approach
More focus on the problems that we face on daily bases
Depending on your response we can delve into the underlying
architecture of git, how git manages/saves/manipulates our
repository/changes/commits.
![Page 6: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/6.jpg)
+Prerequisites :
You need to be a CYGNET
![Page 7: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/7.jpg)
+Goal of these sessions
Current Practice:
MAGIC
![Page 8: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/8.jpg)
+Goal of these sessions
We will try to learn that magic stuff
Magic
![Page 9: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/9.jpg)
+Version Control System
![Page 10: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/10.jpg)
+Version Control System
Management of changes in a computer programs, website,
and other information(more widely called a project in our
environment, we are more comfortable with the project).
Definition
![Page 11: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/11.jpg)
+Version Control System
Revision Control == Version Control == Source Control
More common term = Version Control System = VCS
Common Terms
![Page 12: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/12.jpg)
+Version Control System
Versioning of your files
Revert file/files back to a previous state
Revert the entire project back to a previous state,
Compare changes overtime,
See who last modified something that might be causing
problem
and more.
Capabilities
![Page 13: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/13.jpg)
+Version Control System
Word processing applications/ Spread sheets e.g MS Office,
Google Doc
e.g:
![Page 14: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/14.jpg)
+Version Control System
VCS saved differences as patches, i.e in the form of differences
between two files.
How do they manage changes
![Page 15: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/15.jpg)
+Two Types of VCS’Central
![Page 16: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/16.jpg)
+Two Types of VCS’Distributed
![Page 17: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/17.jpg)
+Central vs Distributed
Single central copy of your project on the server
Programmer commit a change to this central repository
You need to be connected to the server to push your changes
Other programmers working on the same project can see the
change committed
Central
![Page 18: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/18.jpg)
+Central vs Distributed
Common operations such as commits, viewing history and
reverting changes are fast because there is no need to
communicate with a central server.
Each working copy effectively functions as a remote backup of
the codebase and of its change-history, providing inherent
protection against data loss.
Distributed
![Page 19: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/19.jpg)
+Some other DVCSs
BitKeeper is no open source
![Page 20: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/20.jpg)
+Warning!!! Git Ahead!
Information Manager from Hell
![Page 21: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/21.jpg)
+What Git actually is?
Distributed Version Control System
Open source
Exists on each and every platform
![Page 22: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/22.jpg)
+Brief History of Git
Designed and created by Linus Torvalds (the creator of linux
operating system)
Started Development on 3rd April 2005
First commit 7th April 2005
First Project : Linux Kernel with 6.7 million lines of code
![Page 23: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/23.jpg)
+Some more praise for Git
Facilitate distributed development
Scale to handle thousand of developers
Perform quickly and efficiently
Maintain integrity and trust
Enforce accountability
Immutability
Answer to ‘Why Git?’
![Page 24: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/24.jpg)
+Some more praise for Git
Atomic transactions
Support and encourage branched development
Complete repositories
Clean internal design
Answers to ‘Why Git?’
![Page 25: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/25.jpg)
+Git : Practical Approach
Cygwin based Git
Native version : msysGit
Installing Git on Windows
![Page 26: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/26.jpg)
+Git : Practical Approach
http://git-scm.com/download/win
Latest git installer is downloaded
Run the installer to install Git
It will install Git Bash and Git GUI
We will use Git Bash mainly and Git GUI or any other GUI tool
to visually see our changes
Installing Git on Windows
![Page 27: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/27.jpg)
+Git : Practical ApproachInstalling Git on Windows
![Page 28: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/28.jpg)
+Git : Practical ApproachInstalling Git on Windows
![Page 29: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/29.jpg)
+Git : Practical ApproachInstalling Git on Windows
![Page 30: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/30.jpg)
+Git : Practical ApproachInstalling Git on Windows
![Page 31: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/31.jpg)
+Git : Practical ApproachInstalling Git on Windows
![Page 32: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/32.jpg)
+Git : Practical ApproachInstalling Git on Windows
![Page 33: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/33.jpg)
+Git : Practical ApproachInstalling Git on Windows
![Page 34: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/34.jpg)
+Git : Practical ApproachInstalling Git on Windows
![Page 35: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/35.jpg)
+The Git CycleProject
![Page 36: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/36.jpg)
+The Git CycleFiles
![Page 37: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/37.jpg)
+Git : Getting the hands dirty
![Page 38: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/38.jpg)
+Command Line Interface
![Page 39: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/39.jpg)
+Git : Initial SetupIdentify yourself
![Page 40: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/40.jpg)
+Git: Ready, set, repo up!
![Page 41: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/41.jpg)
+Git: A word about .git
![Page 42: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/42.jpg)
+Git: Tracking Files
![Page 43: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/43.jpg)
+Don’t you like VIM???… :SChanging the default editor
![Page 44: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/44.jpg)
+Don’t you like VIM???… :SChanging the default editor
![Page 45: Git session 1](https://reader034.fdocuments.us/reader034/viewer/2022052623/559e021b1a28ab266a8b4642/html5/thumbnails/45.jpg)
+That’s a lot of Git for today!