Everybody begins someplace. Whether or not you’re writing your very first line of code otherwise you’ve been constructing for years and by no means absolutely discovered the instruments beneath, this information is your on-ramp.
That is all the GitHub for Rookies sequence distilled into one holistic story—an in depth path that takes you from “what even is a repository?” all the best way to collaborating on actual tasks and contributing to open supply.
Learn it high to backside, and also you’ll have an entire mannequin of how trendy software program will get constructed on GitHub. Leap to any part, and also you’ll discover a self-contained reply. Let’s dive in.
Half 1: Get your bearings
1. What’s model management (and why does it matter)?
Model management is a system that tracks adjustments to your information over time, and Git is essentially the most extensively used model management system on this planet.
For those who’ve ever saved brand_guide_v2, brand_guide_final, and brand_guide_FINAL_actually, you’ve already felt the issue that model management solves. Git data each change you make, so you’ll be able to see what modified, when, and why. If you have to return to an earlier model, it will probably deal with that, too. You by no means want a folder stuffed with “ultimate” information once more.
Git works via three zones: your working listing (the place you edit), the staging space (the place you evaluate what’s prepared), and the native repository (the place your saved historical past lives). Three instructions transfer work between them (i.e., git standing, git add, and git commit) and also you’ll use them so typically they grow to be muscle reminiscence.
Learn extra: What’s Git? Our newbie’s information to model management
💡 Tip: When somebody says “push your code,” they imply it’s best to use Git to add your native commits to GitHub.
2. How do I arrange and safe my GitHub account?
Your GitHub account is your developer id. You need to be certain that it’s properly protected.
Turning on two-factor authentication (2FA) provides a second layer of safety that retains your account secure even when your password is stolen. Passwords alone are weak to phishing and reuse, so allow 2FA from Settings → Password and authentication.
When you’re right here, give your self a profile README. It is a residing portfolio of your expertise, tasks, and pursuits. Create a public repository with the identical title as your username, add a README, and no matter you write reveals up in your profile web page.
Learn extra: Newbie’s information to GitHub: Organising and securing your profile
💡 Tip: Obtain your restoration codes and retailer them in a password supervisor. They’re your solely manner again in for those who lose your system.
3. Which Git instructions do I really want?
A small set of Git instructions covers the each day workflow of practically each developer.
The instructions you wish to grow to be acquainted with are .config, init, clone, add, commit, push, pull, department, and change.
You don’t must memorize all of Git. Listed here are those you should use to get began:
Learn extra: High 12 Git instructions each developer should know
Half 2: Construct your first undertaking
4. How do I create my first repository?
A repository (or “repo”) is a undertaking folder that tracks adjustments, shops historical past, and lets a number of individuals seamlessly work collectively.
That is your undertaking’s house base. Begin out of your dashboard, the web page you land on once you check in to github.com, which reveals your repositories and exercise feed.
Click on the inexperienced New button
Give your repo a reputation
Select public or non-public
Test the field so as to add a README. That is the very first thing guests see and may act because the entrance door to your undertaking.
That’s it! You might have a repository. You possibly can optionally add a .gitignore to maintain junk information out of model management and a license to inform others what they’re allowed to do together with your code.
What’s a .gitignore for? As you’re employed, your undertaking folder fills up with information you by no means truly wrote. These are issues your laptop or instruments routinely create (e.g. system information, folders of downloaded dependencies, non permanent construct output). You don’t wish to observe or share these, so a .gitignore file lists them and tells Git to go away them alone. It retains your repository clear and centered on the code that really issues.
Learn extra: Newbie’s information to GitHub repositories: How one can create your first repo
5. What’s Markdown and the way do I exploit it?
Markdown is a light-weight language for formatting plain textual content. It’s the way you write READMEs, points, pull requests, and feedback throughout GitHub.
Markdown turns easy symbols into clear formatting. A couple of keystrokes provide you with documentation that’s a pleasure to learn, which may make all of the distinction. You should utilize Markdown syntax, together with some HTML tags, to format your writing on GitHub.
Learn extra: GitHub for Rookies: Getting began with Markdown
6. What’s the GitHub stream?
The GitHub stream is the repeatable loop for safely including work to a shared progress: department, commit, push, open a pull request, merge.
Right here’s the rhythm you’ll carry on repeating:
Clone the repo to your machine
Create a department to your work
Make adjustments
Commit them
Push them to GitHub
Open a pull request.
You possibly can collaborate on something you retailer in a repository. For instance, think about your crew retains its reusable AI prompts in a shared repo. You rework the immediate to enhance the output. You make that change on a department, open a pull request, and a colleague checks the brand new output earlier than it’s accredited. As soon as it’s merged, the following teammate who refreshes the repo is routinely writing from the improved immediate. There’s no must ship out an announcement to make use of the brand new immediate and no attachment drifting round inboxes. It’s the identical branch-review-merge loop builders use, utilized to phrases as a substitute of code.
Learn extra: Newbie’s information to GitHub: Including code to your repository
💡 Tip: Give branches descriptive names like fix-login-bug or add-dark-mode so everybody is aware of what they’re for at a look.
Half 3: Collaborate with different individuals
7. What’s a pull request?
A pull request is a proposal to merge a set of adjustments from one department into one other, with a built-in area for teammates to evaluate and talk about.
A pull request is the place collaboration occurs. It reveals a visible diff of precisely what you modified and provides reviewers a spot to remark . Write a transparent title and outline, hyperlink any associated points, and evaluate your individual pull request first to catch apparent errors.
💡 Tip: Smaller pull requests are simpler and sooner to evaluate and merge, present much less room to introduce bugs, and supply a clearer historical past of adjustments.
Learn extra: Newbie’s information to GitHub: Making a pull request
8. How do I merge a pull request and repair a merge battle?
Merging integrates reviewed adjustments into your goal department. A merge battle is solely Git asking to your assist when two adjustments contact the identical strains of code and it doesn’t know how you can combine each adjustments on the identical time.
Most merges are one inexperienced button: click on Merge pull request, verify, completed. 🎉 Typically two branches edit the identical strains of a file and Git can’t determine which model wins. On this case, GitHub marks the conflicting sections. You employ the browser editor or VS Code to decide on what to maintain, mark it resolved, and merge. With a bit apply, it feels as pure as every other push.
Learn extra: Newbie’s information to GitHub: Merging a pull request
9. What are GitHub Points and Tasks?
Points observe particular person duties, bugs, and concepts, whereas tasks manage these points into a visible board so nothing slips via the cracks.
Points are shared, trackable notes. Every one is a activity, bug, or concept you’ll be able to assign, label, and talk about. Tasks pull these points onto a Kanban-style board so you’ll be able to see the standing of all the problems at a look. Right here’s a small piece of magic that ties all of it collectively. Each difficulty will get its personal quantity. You’ll see it after the title as a hashtag after which a quantity (e.g., Let’s name a pattern difficulty The reply to every thing #42). Whenever you open a pull request to repair that difficulty, you’ll be able to sort a closing key phrase into the pull request description (e.g., Closes #42, Fixes #42, or Resolves #42).
GitHub acknowledges that phrase as a hyperlink between the 2: the pull request and the problem now reference one another. Then, the second that pull request is merged, GitHub routinely marks difficulty #42 as closed for you. If the problem is on a undertaking board, it slides over to the “Accomplished” column by itself. It’s a easy behavior that retains your code adjustments and your activity monitoring in sync with none additional effort.
Learn extra: GitHub for Rookies: Getting began with GitHub Points and Tasks
Half 4: Stage up your tasks
10. What’s GitHub Actions?
GitHub Actions is a CI/CD and automation platform constructed into GitHub that routinely runs duties (e.g., checks, deployments, labeling) when occasions occur in your repo.
As soon as your undertaking is shifting, use GitHub Actions to let GitHub do the repetitive work. Write a workflow as a YAML file in .github/workflows/, inform it what occasion ought to set off it, and outline the steps to run. From then on, GitHub follows these steps by itself.
Learn extra: GitHub for Rookies: Getting began with GitHub Actions
11. How do I publish a web site free of charge?
Received a portfolio, a undertaking web page, or documentation? GitHub Pages can host it free of charge at username.github.io/repo-name with no servers to handle. Allow it from Settings → Pages, select to deploy from a department, and also you’re stay in minutes. Even non-public repositories can publish a public website. That is nice for showcasing work with code you’d quite hold to your self.
Learn extra: GitHub for Rookies: Getting began with GitHub Pages
💡 Tip: Use Pages to advertise your tasks, share what you’re constructing, and develop your portfolio.
12. How do I safe my code on GitHub?
Safety isn’t a ultimate step; it’s a behavior. GitHub Superior Safety is a built-in suite that routinely finds and helps you repair vulnerabilities. It contains secret scanning, Dependabot, and CodeQL code scanning, and it’s free for public repositories.
Secret scanning catches API keys you unintentionally commit. Dependabot watches your dependencies for recognized vulnerabilities and opens pull requests to replace them. CodeQL analyzes how information flows via your code to identify dangerous patterns and explains how you can repair what it finds. Flip all of it on out of your repository settings.
Learn extra: GitHub for Rookies: Getting began with GitHub safety
💡 Tip: You inherit any danger from a library the second you import it into your undertaking, though you didn’t write the weak code your self.
13. How do I contribute to open supply?
Open supply software program has freely out there code that anybody can examine and enhance, and GitHub is its house.
How do you discover the proper undertaking to contribute to? First, search for tasks with a transparent README, a CONTRIBUTING.md, an open supply license, and points tagged good first difficulty. That label is maintainers’ manner of waving newcomers in.
Contributing to actual tasks is likely one of the quickest methods to develop, and a fork makes it secure to take action. A fork is your individual private copy of another person’s repository the place you’ll be able to experiment freely, then suggest your adjustments again with a pull request.
So how is a fork completely different from a department? A department is a parallel workspace inside a repository you have already got permission to alter. A fork copies a whole repository into your account, which is what you want once you don’t have permission to edit the unique (like most open supply tasks). A typical workflow combines each: you fork the undertaking, create a department in your fork to your adjustments, after which open a pull request again to the unique.
Learn extra: GitHub for Rookies: Getting began with open supply contributions
Nonetheless have questions? Try our mostly requested questions and watch the complete sequence of GitHub for Rookies on YouTube. It’s also possible to get began with GitHub Docs.

