SlideShare a Scribd company logo
1 of 13
LUG -4:
BUILDING BLOCKS
Building Software on Linux systems
Build?
• The software meaning of ‘building’ is pretty much the same as the
everyday meaning - to take raw materials and create something useful out
of them.
int c;
int d;
max();
Subl
Jmpl
Addl
Jmp
Popl
Addl
import
java.lang.*
Source files
(The Work Stuff)
int a;
int b;
sum();
import
java.util.*
BUILD PROCESS
Executable File
(The fun stuff)
Why use a Build System
• It makes your workflow reproducible.
• It makes life easier for end-users.
• It helps you document the full software
installation process.
Make
• Classic, original build system released in 1977 for
UNIX.
• Uses a formatted set of instructions, stored in a file
called a Makefile.
Source
Code
targetfile:
source
com
mand
abc.zip: curl
counties.zipMakefile
RESULT
Makefiles
• A makefile consists of sequential rules.
• A rule consists of a target, required components, and commands.
• If the prerequisites are satisfied, the command is performed when the
specific target is called..
target : prerequisites ; command(s)
An Example
CC = gcc
CFLAGS = -c -Wall
all: main
main: main.o randrange.o
$(CC) main.o randrange.o -o password-pronounce
main.o: src/main.c
$(CC) $(CFLAGS) src/main.c
randrange.o: src/randrange.c
$(CC) $(CFLAGS) src/randrange.c
clean:
rm -rf *o password-pronounce
install:
cp password-pronounce /usr/bin/
uninstall:
all is called first, and checks for the
dependency main.
Since main has not been built yet, the
system looks for a rule to build it.
Control flows recursively down the file, until
the first target is built. The rest of the build
then completes upwards
What’s Missing?
• System prerequisites, such as compilers,
linkers and assemblers.
• Even if these are installed, make may not
know the right place to look for them.
• That’s where configure comes in.
Configure
• Configure is an executable shell script that
matches components on the computer to
those required by the Makefile
• Automates system portability, by making
sure that everything is in the right place
Version Control
• Version control is a system that records changes to a file or set of files
over time so that you can recall specific versions later
• A VCS allows you to revert files back to a previous state, revert the entire
project back to a previous state, review changes made over time, see who
last modified something that might be causing a problem, who introduced
an issue and when, and more
• Using a VCS also means that if you screw things up or lose files, you can
generally recover easily
The Git VCS
Git Basics
• Git uses a Git directory, a working directory, and a staging area.
• The Git directory is where everything is actually stored. It’s where Git
keeps your project’s database.
• The working directory is the directory you’re currently working in. It’s one
version of your project.
• The staging area is a file that Git uses to keep track of the changes you’ve
made in the working directory.
Git Basics
The git workflow is as follows:
• You modify files in your working directory.
• You stage the files, adding snapshots of them to your staging area.
• You do a commit, which takes the files as they are in the staging area and
stores that snapshot permanently to your Git directory.
Any given file in a git repository can be only be in one of those three states.
Try out what you learnt!
• We’ve prepared a (small) complete project that includes a configure script,
a makefile, and is stored as a git repository.
• To get it, type this in your git or bash terminal:
git clone https://github.com/puranjay/password-pronounce
• Use the readme file to get it up and running on a Linux machine.

More Related Content

What's hot

Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hubNaveen Pandey
 
Git tutorial II
Git tutorial IIGit tutorial II
Git tutorial IIJim Yeh
 
An introduction to Atlassian Bitbucket Pipelines
An introduction to Atlassian Bitbucket PipelinesAn introduction to Atlassian Bitbucket Pipelines
An introduction to Atlassian Bitbucket PipelinesDave Clark
 
Magento infrastructure by OpsWay
Magento infrastructure by OpsWayMagento infrastructure by OpsWay
Magento infrastructure by OpsWayOpsWay
 
Getting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS UsersGetting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS UsersNoam Kfir
 
Introduction to Git for Network Engineers (Lab Guide)
Introduction to Git for Network Engineers (Lab Guide)Introduction to Git for Network Engineers (Lab Guide)
Introduction to Git for Network Engineers (Lab Guide)Joel W. King
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Gitatishgoswami
 
Puppet / DevOps - EDGE Lviv
Puppet / DevOps - EDGE LvivPuppet / DevOps - EDGE Lviv
Puppet / DevOps - EDGE Lvivzenyk
 
Git with bitbucket (draft)
Git with bitbucket (draft)Git with bitbucket (draft)
Git with bitbucket (draft)Sumin Byeon
 
Intro to Git: a hands-on workshop
Intro to Git: a hands-on workshopIntro to Git: a hands-on workshop
Intro to Git: a hands-on workshopCisco DevNet
 

What's hot (20)

Github
GithubGithub
Github
 
Git theory
Git   theoryGit   theory
Git theory
 
Introduction to git hub
Introduction to git hubIntroduction to git hub
Introduction to git hub
 
Git tutorial II
Git tutorial IIGit tutorial II
Git tutorial II
 
Introduction to git
Introduction to gitIntroduction to git
Introduction to git
 
PyWPS-4.0.0
PyWPS-4.0.0PyWPS-4.0.0
PyWPS-4.0.0
 
Continuos Integration @Knetminer
Continuos Integration @KnetminerContinuos Integration @Knetminer
Continuos Integration @Knetminer
 
Git basics
Git basicsGit basics
Git basics
 
An introduction to Atlassian Bitbucket Pipelines
An introduction to Atlassian Bitbucket PipelinesAn introduction to Atlassian Bitbucket Pipelines
An introduction to Atlassian Bitbucket Pipelines
 
Magento infrastructure by OpsWay
Magento infrastructure by OpsWayMagento infrastructure by OpsWay
Magento infrastructure by OpsWay
 
Git Presentation
Git PresentationGit Presentation
Git Presentation
 
Demo
DemoDemo
Demo
 
Getting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS UsersGetting Started with Git: A Primer for SVN and TFS Users
Getting Started with Git: A Primer for SVN and TFS Users
 
Introduction to Git for Network Engineers (Lab Guide)
Introduction to Git for Network Engineers (Lab Guide)Introduction to Git for Network Engineers (Lab Guide)
Introduction to Git for Network Engineers (Lab Guide)
 
Introduction to Git
Introduction to GitIntroduction to Git
Introduction to Git
 
Puppet / DevOps - EDGE Lviv
Puppet / DevOps - EDGE LvivPuppet / DevOps - EDGE Lviv
Puppet / DevOps - EDGE Lviv
 
Version controll.pptx
Version controll.pptxVersion controll.pptx
Version controll.pptx
 
Introduction git
Introduction gitIntroduction git
Introduction git
 
Git with bitbucket (draft)
Git with bitbucket (draft)Git with bitbucket (draft)
Git with bitbucket (draft)
 
Intro to Git: a hands-on workshop
Intro to Git: a hands-on workshopIntro to Git: a hands-on workshop
Intro to Git: a hands-on workshop
 

Similar to Build Software on Linux with Make, Configure and Git

Introduction to Git for Network Engineers
Introduction to Git for Network EngineersIntroduction to Git for Network Engineers
Introduction to Git for Network EngineersJoel W. King
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Ahmed El-Arabawy
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptxtnscharishma
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIsTim Osborn
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITPouriaQashqai1
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHubVikram SV
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with GitSahil Agarwal
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGeoff Hoffman
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configurationKishor Kumar
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with GitIvano Malavolta
 
IS - section 1 - modifiedFinal information system.pptx
IS - section 1 - modifiedFinal information system.pptxIS - section 1 - modifiedFinal information system.pptx
IS - section 1 - modifiedFinal information system.pptxNaglaaAbdelhady
 
OpenEmbedded & BitBake - Denx
OpenEmbedded & BitBake - DenxOpenEmbedded & BitBake - Denx
OpenEmbedded & BitBake - Denxyang firo
 

Similar to Build Software on Linux with Make, Configure and Git (20)

Introduction to Git for Network Engineers
Introduction to Git for Network EngineersIntroduction to Git for Network Engineers
Introduction to Git for Network Engineers
 
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
Embedded Systems: Lecture 10: Introduction to Git & GitHub (Part 1)
 
Mini git tutorial
Mini git tutorialMini git tutorial
Mini git tutorial
 
Git
GitGit
Git
 
git and github-1.pptx
git and github-1.pptxgit and github-1.pptx
git and github-1.pptx
 
Git for folk who like GUIs
Git for folk who like GUIsGit for folk who like GUIs
Git for folk who like GUIs
 
CSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GITCSE 390 Lecture 9 - Version Control with GIT
CSE 390 Lecture 9 - Version Control with GIT
 
Introduction to Git and GitHub
Introduction to Git and GitHubIntroduction to Git and GitHub
Introduction to Git and GitHub
 
Git training (basic)
Git training (basic)Git training (basic)
Git training (basic)
 
GIT INTRODUCTION
GIT INTRODUCTIONGIT INTRODUCTION
GIT INTRODUCTION
 
Version Control with Git
Version Control with GitVersion Control with Git
Version Control with Git
 
Git 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using GitGit 101 - Crash Course in Version Control using Git
Git 101 - Crash Course in Version Control using Git
 
Git installation and configuration
Git installation and configurationGit installation and configuration
Git installation and configuration
 
[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git[2015/2016] Collaborative software development with Git
[2015/2016] Collaborative software development with Git
 
Git
GitGit
Git
 
IS - section 1 - modifiedFinal information system.pptx
IS - section 1 - modifiedFinal information system.pptxIS - section 1 - modifiedFinal information system.pptx
IS - section 1 - modifiedFinal information system.pptx
 
Mini-training: Let’s Git It!
Mini-training: Let’s Git It!Mini-training: Let’s Git It!
Mini-training: Let’s Git It!
 
OpenEmbedded & BitBake - Denx
OpenEmbedded & BitBake - DenxOpenEmbedded & BitBake - Denx
OpenEmbedded & BitBake - Denx
 
Git hub
Git hubGit hub
Git hub
 
Basics of git
Basics of gitBasics of git
Basics of git
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Recently uploaded (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Build Software on Linux with Make, Configure and Git

  • 1. LUG -4: BUILDING BLOCKS Building Software on Linux systems
  • 2. Build? • The software meaning of ‘building’ is pretty much the same as the everyday meaning - to take raw materials and create something useful out of them. int c; int d; max(); Subl Jmpl Addl Jmp Popl Addl import java.lang.* Source files (The Work Stuff) int a; int b; sum(); import java.util.* BUILD PROCESS Executable File (The fun stuff)
  • 3. Why use a Build System • It makes your workflow reproducible. • It makes life easier for end-users. • It helps you document the full software installation process.
  • 4. Make • Classic, original build system released in 1977 for UNIX. • Uses a formatted set of instructions, stored in a file called a Makefile. Source Code targetfile: source com mand abc.zip: curl counties.zipMakefile RESULT
  • 5. Makefiles • A makefile consists of sequential rules. • A rule consists of a target, required components, and commands. • If the prerequisites are satisfied, the command is performed when the specific target is called.. target : prerequisites ; command(s)
  • 6. An Example CC = gcc CFLAGS = -c -Wall all: main main: main.o randrange.o $(CC) main.o randrange.o -o password-pronounce main.o: src/main.c $(CC) $(CFLAGS) src/main.c randrange.o: src/randrange.c $(CC) $(CFLAGS) src/randrange.c clean: rm -rf *o password-pronounce install: cp password-pronounce /usr/bin/ uninstall: all is called first, and checks for the dependency main. Since main has not been built yet, the system looks for a rule to build it. Control flows recursively down the file, until the first target is built. The rest of the build then completes upwards
  • 7. What’s Missing? • System prerequisites, such as compilers, linkers and assemblers. • Even if these are installed, make may not know the right place to look for them. • That’s where configure comes in.
  • 8. Configure • Configure is an executable shell script that matches components on the computer to those required by the Makefile • Automates system portability, by making sure that everything is in the right place
  • 9. Version Control • Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later • A VCS allows you to revert files back to a previous state, revert the entire project back to a previous state, review changes made over time, see who last modified something that might be causing a problem, who introduced an issue and when, and more • Using a VCS also means that if you screw things up or lose files, you can generally recover easily
  • 11. Git Basics • Git uses a Git directory, a working directory, and a staging area. • The Git directory is where everything is actually stored. It’s where Git keeps your project’s database. • The working directory is the directory you’re currently working in. It’s one version of your project. • The staging area is a file that Git uses to keep track of the changes you’ve made in the working directory.
  • 12. Git Basics The git workflow is as follows: • You modify files in your working directory. • You stage the files, adding snapshots of them to your staging area. • You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory. Any given file in a git repository can be only be in one of those three states.
  • 13. Try out what you learnt! • We’ve prepared a (small) complete project that includes a configure script, a makefile, and is stored as a git repository. • To get it, type this in your git or bash terminal: git clone https://github.com/puranjay/password-pronounce • Use the readme file to get it up and running on a Linux machine.