0% found this document useful (0 votes)
2 views

Git and Github Notes

The document provides an overview of Git commands and concepts, including repository management, staging changes, committing, pushing, and branching. It explains how to clone repositories, manage branches, and handle pull requests, as well as how to undo changes and resolve conflicts. Additionally, it touches on the concept of forking repositories for collaborative development.

Uploaded by

Milan Patel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Git and Github Notes

The document provides an overview of Git commands and concepts, including repository management, staging changes, committing, pushing, and branching. It explains how to clone repositories, manage branches, and handle pull requests, as well as how to undo changes and resolve conflicts. Additionally, it touches on the concept of forking repositories for collaborative development.

Uploaded by

Milan Patel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

DATE:

PAGE NO. 1
GtIT AND GTHIUB
GtT:
’Ghit toa egaiau Contao) 3ysBem
Vesaibu CoAt aol Systew
kaat latlpa to- tosbck chavges in code

19ecase ) Tocck the HstoaL


2) Collabóocile

eosite.that alloais- developens to stoe


code Git
mnage
https github.coM
Used. to olecl Faldei aka Repositoraes.
Ipooject
CReATe ReeosiTORY
On aebaite

aeljemed
Commit

add Reaclky to cornoi


VISION
DATE:
PAGE NO. 2

’ainiOohs^Viaiualhadis cacle
Tegnainaal

tnatellod on Ma chlne.

CONEtaRINC GtIT

git confiq qlcbal MsesnamdlYoua nbma

--glold
--list

--gloloal --loco
account)

CLONE

CLONE Aepositoy
machine

emote tocal
[ Github]

Core copy
git clona
DATE
DPAGE NO

Teamiml cammnalsd chlage diaetey


clea
cleag ’cleae Teorninel
Space
Ql jles inelucling hielden

SATLIS_ aliaplays stah. oE He cece

git stahug
Note Afte Modyale rmustE peataim 2step proces
’Oaramit

’nlhen uaiag git stahus,


stahis e have 4 types
stahsan Haey
) ntroccked Aot git
Hles t qit cdoesn't
roack yet

2) Madifiec canged (thete changein


Nae tacc I<ec file

3) UnModified unchanged
4) 3taged Ale eacly to be cammited.
CA)

Neo ile
Change (untoacted )
(MociEiest)
ENGAGhEMEN (skaged)
IWEDDING, CoMMÎt (nchanget)
VISION
DATE:
PAGE NO.

ApD CoMMI

ADD alal changed Ales


yau bakin9 aiaectom to the
Gilk staging
qitacd <flleame >

add

signieies all
Ciles

CONNIT i9 thei

Scammlt Laome essage


Note looaneh ahecL
by 1commit. ’Bagi meaning
1 Comnmit
Ous ocal mecline
aitlbub.]
PusH CoNNAND
PU3H olocd local oepo tanteut to
emote

qitpuslh rigin maiîa


local oemote remote boanca namec
namc
main
dqcut
VISION
DATE:
PAGE NO.

4 TNIT CoMMAND:LLused to caeate aineo git oepo

git init
in ’nitalize an eniptygit aepo.
oemote acal cigin

Adols -Hub
mamecl caigin
Can se cliteoent mome
ConvenHanaly
bul hale fhe
onnigin
athe nome When Coe
puala
emote -V CUoDent emote

bocnc To Chec

glt baanch -M main


Ioaanca
bacneh nae

main
Noucoe Can USe -u

traigín in alove commancl

SOt Upatoam means


1

ony m'te gt pUsh, it


pushes to oroigin main.
VISION

DATE:
PAGE NO.

set upstoear. u'àUseo


pRaject
eohon coe
pesiocl
SOme
fo olonga
tine
aloRKELOA
Loccl Git ’ coeate Gthtib
clone

changes
adlol

Commtt

push

GiIT BRANHES
Featuse

G3
Cy Toee

C2

Hoeter potnt

hen mulhiale deve


boonches
ame
Can oe
Bam ais Feahes
Nain at (altes pont
VISION
DATE :
PAGE NO.

BeaNC CoNNANDS

qltbaanch To check bocnc

qit bnanchM
boahca
boanca
nae name

qt checkout - b
oeate a Ne baanch

checkout 2ooCYh name

oance iad <baanch hame> To delete a


baancklcannat clelete Ane
baanca)
MERAINGCoDE

<boanck name Tó condaae commlts.


boarahes Alesg moNe bluo

oeage < bacnca name > ’ To Hesge 2


bances
alay 2 Cheate Pull Regust on Grithub
ALelasite

(p.t.o.)
VISION

DATE:
PAGE NO

uLL ResuEST:tlets you telloHaers' abe


clkorges yau ve pslaec to a
onanck in a nepasitony
Teqiesl to
seniomt dlevelapen
to cheok Hae ckanges T have made and
Metge t Comment n Hhe changes

CaMNAND

git pull caigia main


uSed ta fetcht anol oloLonload Cantent am
Gepo anol upclaute
ernote
tomatcu
iromedlittey
thcet conto

ResONLA NeRaE CONELICTS

eNent Hhat
tUnable to automatcall esale difenenea in

Ialhan changes Same

2 commia, qit gels


hesge
# UNDoIN G CHANGES
acloLod but stll
comted
’Cose 1:SACAED CHANCES not

git eset < File names


git oeSet
NOISA
GDATE:
PAGE NO.

Case 2 Commitec chanaes (fo one commib


Changes
eset HEADn1

Case 3 Comaited Changes (Eoz Camoits)

cororit hasa

eset -- harc <commit -


hash

Useo to oemove
Chages hom VSecle
(tncl. -Jt)

To check all coromit hilamy


CommitE hashe
to

FoRK

fork is new acpositoy that shaaes


Coce andl vislbilihy eltings oith Hae
toigiaal upstoeom aepositoy
foK a
Copy
Used make Copy o Someane else'
neposla ccount 8 pull tesks
2eut o ontginal nepaaily acceuut.
’helpg in open Sousce Cont aibution.

You might also like