0% found this document useful (0 votes)
129 views11 pages

GitHub Hello World Guide

1) The document is a tutorial that guides users through creating their first GitHub repository called "Hello World". It teaches GitHub essentials like repositories, branches, commits, issues, and pull requests. 2) The tutorial instructs users to create a new repository, add a README file, open an issue to edit the README, create and switch to a new branch, make commits on the new branch, open a pull request to merge changes into the default branch, and then merge and delete the branch. 3) Completing the tutorial accomplishes common GitHub tasks like creating a repository, branch, issue, and pull request, then merging a pull request to demonstrate the GitHub flow.

Uploaded by

Sunil Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
129 views11 pages

GitHub Hello World Guide

1) The document is a tutorial that guides users through creating their first GitHub repository called "Hello World". It teaches GitHub essentials like repositories, branches, commits, issues, and pull requests. 2) The tutorial instructs users to create a new repository, add a README file, open an issue to edit the README, create and switch to a new branch, make commits on the new branch, open a pull request to merge changes into the default branch, and then merge and delete the branch. 3) Completing the tutorial accomplishes common GitHub tasks like creating a repository, branch, issue, and pull request, then merging a pull request to demonstrate the GitHub flow.

Uploaded by

Sunil Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

06/08/2015

HelloWorldGitHubGuides

VideoGuides

GitHubHelp

GitHub.com

HelloWorld
10minuteread

TheHelloWorldprojectisatimehonoredtraditionincomputerprogramming.It
isasimpleexercisethatgetsyoustartedwhenlearningsomethingnew.Lets
getstartedwithGitHub!
GitHubisaplatformforhostingandcollaboratingonprojects.Youdonthaveto
worryaboutlosingdataonyourharddriveormanagingaprojectacrossmultiple
computerssyncfromanywhere.Mostimportantly,GitHubisacollaborative
andasynchronousworkflowforbuildingsoftwarebetter,together.
ThisguidewalksyouthroughtheGitHubEssentials:Repositories,Branches,
Commits,IssuesandPullRequests.
Withtheseskills,youllgofar.Andwiththis helloworld repositoryyoull
haveaplacetostoreideas(akafuturerepositories,likejlord/helloworld),
resourcesorothergeneralnotes,evendiscussthingswithothers(like
holman/feedback).

Install&CodeFreeZone
WeregoingtocompletethetasksinthistutorialusingGitHub.com,soyoudont
havetoknowthecommandlineoreveninstallGit(whichisthechangetracking
softwareGitHubisbuilton).Youdontevenneedtoknowhowtocode.Youwill,
https://guides.github.com/activities/helloworld/

1/11

06/08/2015

HelloWorldGitHubGuides

however,needaGitHubaccount,sosignupifyoudonthaveone!
Tip:Openthisguideinaseparatebrowserwindow(ortab)soyoucansee
itwhileyoucompletethestepsinthetutorial.

CreateaRepository
ArepositoryisthebasicunitofGitHub,mostcommonlyasingleproject.
Repositoriescancontainfoldersandfiles,includingimagesanythingyour
projectneeds.BecausewerecommendincludingaREADME,orafile
describingtheproject,ineveryrepository,GitHubmakesiteasytoaddoneat
thesametimeyoucreateyournewrepository.Italsooffersothercommon
optionssuchasalicensefile,butwecanskipthatfornow.

Tocreateanewrepository
1. Clicktheiconnexttoyourusername,topright.
2. Nameyourrepository helloworld .
3. Writeashortdescription.
4. SelectInitializethisrepositorywithaREADME.

Intro
https://guides.github.com/activities/helloworld/

2/11

06/08/2015

HelloWorldGitHubGuides

Createa
Repository
Openan
Issue
Createa
Branch
Makea
Commit
Opena
Pull
Request
MergePull
Request

ClickCreaterepository.Boom,repository!

OpenanIssue
AnIssueisanoteonarepositoryaboutsomethingthatneedsattention.Itcould
beabug,afeaturerequest,aquestionorlotsofotherthings.OnGitHubyou
canlabel,searchandassignIssues,makingmanaginganactiveprojecteasier.
Youvegotarepositorynow,butitsprettybare.ItcoulduseaREADMEwith
moreinformationinitsothatpeopleknowwhatisgoingon.OpenanIssue!

OpenanIssueforREADMEedits
1. ClicktheIssuestabfromthesidebar.
2. ClickNewIssue.
3. GiveyourIssueatitleanddescription.

https://guides.github.com/activities/helloworld/

3/11

06/08/2015

HelloWorldGitHubGuides

ClickSubmitnewIssuewhenyouredone.Nowthisissuehasapermanent
home(URL)thatyoucanreferenceevenafteritisclosed.
Next,worktowardseditingyourREADMEandclosingthisissue.

CreateaBranch
Branchingisthewaytoworkondifferentpartsofarepositoryatonetime.
Whenyoucreatearepository,bydefaultithasonebranchwiththename
master .Youcouldkeepworkingonthisbranchandhaveonlyone,thatsfine.
Butifyouhaveanotherfeatureorideayouwanttoworkon,youcancreate
anotherbranch,startingfrom master ,sothatyoucanleave master inits
workingstate.
Whenyoucreateabranch,youremakingacopyoftheoriginalbranchasitwas
atthatpointintime(likeaphotosnapshot).Iftheoriginalbranchchangeswhile
youreworkingonyournewbranch,noworries,youcanalwayspullinthose
updates.

https://guides.github.com/activities/helloworld/

4/11

06/08/2015

HelloWorldGitHubGuides

Youmayhave,atsomepointinyourlife,saveddifferentversionsofafilelike,
story.txt,storyjoeedit.txt,storysueedit.txt.Branchesaccomplishthesame
goalsbutareeasiertomanageonGitHubrepositories.
AtGitHub,ourdevelopers,writers,anddesignersusebranchesforkeepingbug
fixesandfeatureworkseparatefromour master (production)branch.Whena
featureorfixisready,thebranchismergedinto master .

Tocreateanewbranch
1. Gotoyournewrepository helloworld .
2. Clickthedropdownatthetopofthefilelistthatsaysbranch:master.
3. Typeabranchname, readmeedits ,intothenewbranchtextbox.
4. SelecttheblueCreatebranchboxorhitEnteronyourkeyboard.

https://guides.github.com/activities/helloworld/

5/11

06/08/2015

HelloWorldGitHubGuides

Nowyouhavetwobranches, master and readmeedits .Theylookexactly


thesame,butnotforlong!Nextwelladdourchangestothenewbranch.

Makeacommit
OnGitHub,savedchangesarecalledcommits.Commitsareprettyglorious,
becauseabunchofthemtogetherreadlikethehistoryofyourproject.
Eachcommithasanassociatedcommitmessage,whichisadescription
explainingwhyaparticularchangewasmade.Thankstothesemessages,you
andotherscanreadthroughcommitsandunderstandwhatyouvedoneand
why.
Youshouldstillbeonthecodeviewforyour readmeedits branch,now
makesomechanges!

Tocommitchanges
https://guides.github.com/activities/helloworld/

6/11

06/08/2015

HelloWorldGitHubGuides

1. ClicktheREADMEfile.
2. Clickthepenciliconintheupperrightcornerofthefileviewtoedit.
3. Intheeditor,writesometext,tellabitaboutyourself.
4. Writeacommitmessagethatdescribesyourchanges.

ClickCommitchanges.NowthesechangeshavebeenmadetotheREADME
fileonyour readmeedits branchandnowthisbranchcontainsdifferent
contentandcommitsthan master (asitshould!).

OpenaPullRequest
PullRequestsaretheheartofcollaborationonGitHub.Whenyoumakeapull
request,youreproposingyourchangesandrequestingthatsomeonepullin
yourcontributionakamergethemintotheirbranch.GitHubsPullRequest
featureallowsyoutocomparethecontentontwobranches.Thechanges,
additionsandsubtractions,areshowningreenandredandcalleddiffs
(differences).
https://guides.github.com/activities/helloworld/

7/11

06/08/2015

HelloWorldGitHubGuides

Assoonasyoumakeachange,youcanopenaPullRequest.PeopleusePull
Requeststostartadiscussionaboutcommits(codereview)evenbeforethe
codeisfinished.Thiswayyoucangetfeedbackasyougoorhelpwhenyoure
stuck.
ByusingGitHubs@mentionsysteminyourPullRequestmessage,youcanask
forfeedbackfromspecificpeopleorteams,whethertheyredownthehallor10
timezonesaway.
Youcanevenopen,asweredoinghere,aPullRequestinyourownrepository
andmergeityourself.Itsagreatwaytolearntoprocessbeforeworkingon
largerprojects.

CreateaPullRequestforchangestotheREADME
Clickontheimageforalargerversion
Step

Screenshot

ClickthePullRequesticonon
thesidebar,thenfromthePull
Requestpage,clickthegreenNew
pullrequestbutton.

Selectthebranchyoumade,
readmeedits ,tocomparewith
master (theoriginal).

https://guides.github.com/activities/helloworld/

8/11

06/08/2015

HelloWorldGitHubGuides

Lookoveryourchangesinthediffs
ontheComparepage,makesure
theyrewhatyouwanttosubmit.

Whenyouresatisfiedthatthese
arethechangesyouwantto
submit,clickthebiggreenCreate
PullRequestbutton.

Giveyourpullrequestatitleand
sinceitrelatesdirectlytoanopen
issue,includefixes#andthe
issuenumberinthetitle.Writea
briefdescriptionofyourchanges.

Whenyouredonewithyourmessage,clickCreatepullrequest!
Tip:Youcanuseemojianddraganddropimagesandgifsontocomments
andPullRequests.

https://guides.github.com/activities/helloworld/

9/11

06/08/2015

HelloWorldGitHubGuides

MergeyourPullRequest
Itstimetobringyourchangestogethermergeyour readmeedits branch
intothe master branch.
1. Clickthegreenbuttontomergethechangesinto master .
2. ClickConfirmmerge.
3. Goaheadanddeletethebranch,sinceitschangeshavebeenincorporated,
withtheDeletebranchbuttoninthepurplebox.

Ifyourevisittheissueyouopened,itsnowclosed!Becauseyouincludedfixes
#1inyourPullRequesttitle,GitHubtookcareofclosingthatissuewhenthe
PullRequestwasmerged!

Celebrate!
YouvelearnedtomakeapullrequestonGitHub!

Foryourhumblebrag,herearethethingsyouaccomplishedinthistutorial:
createdarepository,branch,issue,andpullrequest,thenmergedapull
request!Showoffyournewcontributionsquares!
Ifyouwanttolearnmoreaboutthepowerofpullrequests,werecommend
readingtheGitHubFlowGuide.YoumightalsovisitGitHubExploreandget
involvedinanOpenSourceproject

https://guides.github.com/activities/helloworld/

10/11

06/08/2015

HelloWorldGitHubGuides

Tip:CheckoutourotherGuidesandYouTubeChannelformoreGitHub
howtos.

LastupdatedMay,2014

GitHubisthebestwaytobuildandshipsoftware.
Powerfulcollaboration,codereview,andcodemanagementforopensourceandprivate
projects.

https://guides.github.com/activities/helloworld/

11/11

You might also like