Whether you’re just starting your coding journey or looking to understand version control, Git and GitHub are essential tools you’ll encounter in your development career. This guide will walk you through the fundamentals of Git and GitHub, drawing on insights from our workshop with Laura Berge, a curriculum writer for software engineering at Flatiron School.
What You’ll Learn
By the end of this guide, you’ll have foundational knowledge about:
- What Git is and how it manages coding projects
- Basic Git commands used in professional workflows
- How to make your first pull request on GitHub
Remember, you don’t need to memorize everything. Professional developers use Google and cheat sheets constantly. The goal is to understand the foundations so you can practice and research on your own.
Understanding Git: Your Project’s Time Machine
Git is a distributed version control system. Think of it like the version history feature in Google Sheets or Microsoft Word, but for your coding projects.
Why Use Git?
Git allows you to:
- Track changes in your project over time
- Go back to previous versions if you make a mistake
- Work on multiple features simultaneously through branches
- Collaborate with team members without conflicts
Key Concept: Git is Not GitHub
This is important: Git is not GitHub, and GitHub is not Git. Git works both locally (on your computer) and remotely (on the web). You can use Git without GitHub, but GitHub uses Git to provide a collaborative platform for developers.
Local vs. Remote: Two Sides of Version Control
Local refers to your computer. When you’re working on a project in your computer, you can track it with Git locally.
Remote refers to platforms like GitHub, GitLab, or Bitbucket. These are web-based services where you can store your code and collaborate with others.
Getting Started: Essential Git Concepts
The Staging Area
When you save a file, it doesn’t automatically get tracked by Git. There’s an extra step:
- Save your file with new code
- Add it to the staging area (preparing changes to be committed)
- Commit the changes (officially recording them in your project history)
Think of the staging area like setting a stage for a theater performance. You’re preparing what you want to commit to your project.
Basic Git Commands
Here are the fundamental commands you’ll use:
git init
Initializes a new Git repository in your project folder. This sets up tracking for your project.
git add [filename] or git add .
Adds files to the staging area. The dot (.) adds all changed files in the current folder.
git commit -m "your message"
Commits your staged changes with a descriptive message about what you changed.
git status
Shows you what branch you’re on, what files have changed, and what’s in your staging area.
git log
Displays your commit history so you can see all the changes you’ve made over time.
Working with Branches: Your Parallel Universes
Branches are one of Git’s most powerful features. They let you create different versions of your project simultaneously.
Why Branches Matter
Imagine you’re working on a team. You’re adding a “like button” feature while your colleague Susie works on a “comment system.” Without branches, you’d both be changing the same files and creating chaos.
With branches:
- You each create your own branch
- Work independently on your features
- Merge your completed work back into the main project
Branch Commands
git branch
Shows all your branches and which one you’re currently on.
git branch [branch-name]
Creates a new branch.
git checkout [branch-name]
Switches to a different branch.
Best Practice: Never commit directly to the main branch in professional environments. The main branch should always contain working, production-ready code.
Remote Operations: Connecting to GitHub
Pulling and Pushing
git pull origin [branch-name]
Downloads code from the remote repository and merges it into your current branch.
git push origin [branch-name]
Uploads your local commits to the remote repository.
Think of it this way: you’re pulling code down from GitHub to your computer, and pushing your code up from your computer to GitHub.
Cloning Repositories
git clone [repository-url]
Creates a local copy of a remote repository on your computer. This is how you’d download someone else’s project from GitHub to work on it locally.
Making Your First Pull Request
A pull request (PR) is how you contribute to projects on GitHub. It’s essentially saying: “Hey, I made some improvements to your project. Would you like to include them?”
Step-by-Step Pull Request Process
- Fork the repository: Creates your own copy of someone’s project on GitHub
- Create a new branch: Make a branch for your changes
- Make your changes: Edit files directly on GitHub or locally
- Commit your changes: Add a descriptive commit message
- Open a pull request: Request that your changes be merged into the original project
When you successfully contribute to a project, you’ll be listed as a contributor on that repository!
Why It’s Called a “Pull” Request
Many beginners wonder why it’s not called a “push” request since you’re pushing code. The name comes from the repository owner’s perspective: they’re deciding whether to pull your code into their project.
Understanding Merge Conflicts
Sometimes when you try to merge branches, Git can’t automatically combine the changes. This happens when the same lines of code were changed differently in two branches.
Don’t panic! Merge conflicts are normal. GitHub makes it relatively easy to resolve them by showing you both versions and letting you choose which to keep.
Best Practices for Beginners
Make Small, Frequent Commits
Commit often with descriptive messages. Instead of one huge commit at the end, make small commits as you complete each piece of functionality.
Write Clear Commit Messages
Your commit message should describe what changed. For example:
- Good: “Add login button to homepage”
- Bad: “Updated stuff”
Use Cheat Sheets
Professional developers use cheat sheets and Google constantly. GitHub provides an excellent Git cheat sheet for common commands that you can reference anytime.
Start Simple
Don’t try to learn everything at once. Start with basic commands like add, commit, and status. As you get comfortable, gradually explore more advanced features.
Real-World Example: React on GitHub
Want to see Git and GitHub in action? Check out the React library on GitHub. You can explore:
- Thousands of commits showing the project’s history
- Multiple branches for different features and versions
- Commit messages from developers explaining their changes
- How a major open-source project manages collaboration
Open Source: The Power of Collaboration
One of the best things about being a programmer is the culture of sharing code. Open source means:
- Code is freely available for others to use
- You can contribute to projects you use
- Companies share code to improve workflows across the industry
- You don’t have to reinvent the wheel for every project
When you make pull requests to open source projects, you’re joining this collaborative community.
Next Steps: Practice Makes Perfect
The best way to learn Git and GitHub is by doing:
- Create a GitHub account if you don’t have one
- Try forking a beginner-friendly repository
- Make a small change and submit a pull request
- Create your own repository for a personal project
- Practice the basic commands:
init,add,commit,status
Remember, every expert developer was once a beginner who didn’t know what a pull request was. With patience and practice, these tools will become an essential part of your development workflow.
Additional Resources
- GitHub’s “Hello World” tutorial: A beginner-friendly introduction
- Try searching “Git tutorial” on YouTube for visual demonstrations
- Consider a structured Software Engineering program like Flatiron School for comprehensive coding education
Final Thoughts
Git and GitHub are fundamental tools in modern software development. While they might seem complex at first, they’re designed to make your life easier by tracking changes, enabling collaboration, and providing a safety net for your code.
Don’t be discouraged if you don’t understand everything right away. Focus on the basics, use available resources, and practice regularly. Before you know it, you’ll be forking repos, making pull requests, and collaborating with developers around the world!
Frequently Asked Questions
What does “repo” mean?
A repo (repository) is basically a folder with Git tracking set up. It contains all your project files plus the history of all changes made to those files.
Can I use someone else’s code in my project?
Yes! That’s the beauty of open source. When code is open source, it means developers are allowing others to use and contribute to it. Always check the license to understand how you can use it.
Can I have Python and Java code in the same repo?
Absolutely. If you have a project that uses multiple programming languages, you can put them all in the same repo. However, you typically wouldn’t put multiple unrelated projects in one repo.
Do I need to make a pull request for every push?
No. Pull requests are specifically for contributing to other people’s projects or for collaborative workflows where code needs review before merging. If you’re working on your own personal project and pushing to your own repository, you don’t need pull requests.
How do I delete a repository?
On GitHub, go to the repository’s Settings, scroll to the “Danger Zone” at the bottom, and select “Delete this repository.” You’ll need to type the repository name to confirm. Be careful with this action as it’s permanent!
What’s the difference between Git and GitHub?
Git is the version control system that runs on your computer. GitHub is a website that hosts Git repositories and provides collaboration features. You can use Git without GitHub, but GitHub requires Git.
I’m feeling overwhelmed. Is this normal?
Absolutely! Learning Git can feel overwhelming at first, especially if you’re new to coding. Our brains sometimes put up a “brick wall” to new information. The best way to break through is immersion and practice. Don’t expect to understand everything immediately. Watch tutorials, read documentation, and most importantly, practice. It gets easier!
What if I make a mistake?
That’s the beauty of Git! Because it tracks your entire history, you can always go back to a previous version. Mistakes are part of learning, and Git gives you a safety net.
Do I need to memorize all these commands?
No! Professional developers constantly reference cheat sheets and use Google. Focus on understanding the concepts rather than memorizing syntax. With practice, the most common commands will become second nature.
What’s the difference between repositories and projects?
In Git and GitHub, a repository (repo) is the fundamental unit. It’s a folder containing your project files plus all the Git tracking data. “Project” is a more general term that refers to the actual work you’re doing. In many contexts, the terms are largely interchangeable. For example, saying “Here’s my project” or “Here’s my repo” usually means the same thing. Essentially, a repo stores the code, documentation, and other files for your project.
How important is my GitHub profile when applying for developer jobs?
Your GitHub profile is especially important if you’re an entry-level or mid-level engineer. Since you may not have worked on large-scale projects for companies yet, your GitHub profile demonstrates that you’ve been coding, working on projects, and know how to use the technologies listed on your resume. As you become more senior and work on private company repositories, your GitHub profile becomes less critical, but when you’re starting out, it’s very important.
How do I create a professional GitHub profile page?
Start with a GitHub profile generator to make your life easier. These tools let you input your information and automatically generate a professional profile README. Your profile should include:
- A quick bio describing what you do and what you’re interested in
- Technologies you use
- GitHub statistics showing your activity
- Contact information (email, website links) so recruiters can reach out
- Links to your best projects
You can find profile generators and examples by searching for “GitHub profile README generator” or “awesome GitHub profile README.”
What should I include in my pinned repositories?
Pin 2-3 of your best projects to the top of your GitHub profile. These should be the projects you’re most proud of. For each pinned repository, make sure you have:
- A detailed README file with proper documentation
- Video demos or GIFs showing your application in action (recruiters won’t have time to download and run your code)
- Screenshots of how your app looks when running
- Clear instructions on how to run the application
- A features list explaining what the application does
- Proper commit history showing your development process
You can use README generators to help structure your repository documentation professionally.
How much GitHub activity should I have when searching for my first tech role?
Recruiters typically look for 2-3 months of consistent GitHub commit history. This tells them you’ve been practicing consistently and aren’t just starting out. Your commit history graph on your profile page shows your activity level, so make sure you’re regularly working on projects.
What types of projects should I showcase?
There are two approaches that impress recruiters:
- One complex, long-term project: Work on a single project consistently for 1-2 months, continuously adding features and refining it. For example, build a website and then iterate by adding unit tests, improving performance, building admin pages, or adding new user features. This shows you can work on complex projects and manage growing complexity.
- Multiple smaller projects solving a variety of problems: Build several projects solving different real-world problems. This demonstrates you can build solutions for a variety of problems that may come up on the job using various technologies.
Focus on building projects you’re actually interested in, because you’re more likely to put in the effort needed to make them impressive. Recruiters often find it impressive if your projects are tailored to the types of jobs you are applying for or have a background in as well. For example, if you are a truck driver transitioning into tech, build the logistics app you wish you had on the job.
What are the most important Git best practices for my repositories?
- Commit frequently with small changes: Make smaller, granular commits rather than large, infrequent ones. This makes your code easier to review, understand, and roll back if needed.
- Write descriptive commit messages: Follow conventional commit formatting (check out conventionalcommits.org). Each commit should have a clear subject and body description explaining what changed and why. Other people (and your future self) will read your commits.
- Structure commits consistently: Use a standard format for all your commits. While companies will have their own conventions, for personal projects, following conventional commits makes you look professional.
- Add tests to your projects: Every project should include unit tests at minimum. This is a best practice you’ll use in any professional development role, and it demonstrates you understand modern software development practices.
Should I add a project to GitHub if it doesn’t have Git history?
Absolutely! If you built a three-month project outside of Git, you should still add it to GitHub with proper documentation. Include:
- An overview of features
- Instructions on how to run it
- A good walkthrough video for non-technical recruiters
- Well-organized code that demonstrates your coding practices
Technical recruiters can still review your code to see how you solve problems and manage complexity, even without commit history.
Should I contribute to open source projects?
Yes! Contributing to open source is relevant to recruiters in several ways:
- Any contributions show up in your GitHub commit history
- Significant contributions give you talking points for technical interviews where you can discuss your problem-solving approach
- Some companies have open source projects, so you can contribute before applying to understand their codebase
For resources on getting started, check out “How to Open Source” (opensource.guide) which provides comprehensive guidance for beginners.
Is it better to focus on personal projects or open source contributions?
Both are valuable, and one doesn’t necessarily matter more than the other. What matters is that you’ve worked with complex features and can use the technologies on your resume. You can gain this experience through either personal projects or open source work. As long as you can explain the technical challenges and how you solved them, and your contributions show up in your commit history, you’re demonstrating your skills.
How do I control who can see my code on GitHub?
When creating a repository, you can make it public or private. Make repositories public if you want to show your work to recruiters. Make them private if you’re working on something sensitive, and then you can invite specific people as needed. GitHub provides additional security layers depending on your needs.
Who owns the code I put on GitHub?
You own your code. It’s not automatically open source. Ownership and usage rights depend on the license file you include in your project. You can choose different license types that give others varying levels of permission to use your code. GitHub provides license templates to help you select the appropriate one. For example, companies like Microsoft can only use your code for purposes like machine learning if your license explicitly allows it.
How do recruiters use GitHub profiles?
It depends on the stage of interviewing and who’s reviewing:
- Non-technical recruiters (early stages) typically look at your overall commit history activity and pinned projects to verify you’re actively coding
- Technical recruiters or hiring managers (later stages) dive deeper into your commit history, how you structure commits, what projects you’ve built, your code quality, and how you solve problems
Make sure both audiences can get what they need from your profile: consistent activity for the former, and quality code with good documentation for the latter.
Should I focus more on building projects or learning algorithms?
Both are important and demonstrate different skills:
- Complex projects show you understand modern development practices and can manage complexity as it grows
- Algorithm proficiency shows you can solve novel problems and understand computer science fundamentals that come up in system design and daily engineering work
Different companies prioritize differently. Some (like Morning Brew) ask you to build projects instead of doing algorithm interviews, while others (like Google) have multiple rounds of algorithm questions. Practice both because they’re both important for your day-to-day job and interviews.
What features should I add to my projects?
Don’t add features randomly. It’s more important to implement features properly than to throw in a bunch of half-working functionality. That said:
- For frontend-focused roles: Build polished components, smooth animations, optimized performance, and excellent UX
- For backend-focused roles: Add caching, performance optimization, database optimization, and use appropriate database types for your use case
- For all projects: Add unit tests at minimum. Integration and end-to-end tests are great for complex projects, but every project should have unit tests showing you know software development best practices
Can I host my web development projects on GitHub?
GitHub pages is a free, built-in hosting service by GitHub that turns files directly from a repository into a live, static website (HTML, CSS, and JavaScript). It is widely used for personal portfolios, project documentation, and blogs, allowing users to publish sites directly from their version-controlled Git workflow. For career changers, it is a great solution for hosting your portfolio site. You can also showcase your bootcamp capstone projects and other work, making it easy for potential employers to see your skills in action. For a step-by-step guide, check out Quickstart for GitHub Pages.


