SlideShare a Scribd company logo
Round 3 - Jacob Jenkins
Working with others™
A guide to branching, merging, and rebasing.
Code of Conduct
- Branch when creating a new feature.
- Keep origin/master working.
- Pull before you push.
- Rebase with caution.
Branching
So, you have a super cool feature you want to add to your
group’s project...
git checkout -b super-cool-feature
Now start coding!
Branch Road Rules
- Give the branch a meaningful name.
- It’s alright for more than one person to work on a branch.
- Make sure to pull origin/master before merging back.
How do we merge our feature back into origin/master?
Two options...
1. Merge it manually!
$ git checkout master
$ git merge super-cool-branch
2. If you’re using GitHub, submit a pull request!
Create Pull Request
Pull Requests
Pull Requests
Pull Requests
Pull requests are also great for
contributing to open source projects.
The magic of pulling before pushing.
git pull does a git fetch and a git merge.
What does that mean...
It means changes are applied before you commit, minimizing
merge conflicts.
Merge Conflicts
- What’s a merge conflict?
- How do I solve it?
function superCoolFunction() {
<<<<<<< HEAD
console.log(“Wow, this function is cool”);
=======
console.log(“Wow, this function is awful”);
>>>>>>> negative-attitude
In most cases, you can solve it with your editor.
function superCoolFunction() {
console.log(“Wow, this function is cool”);
}
$ git add supercool.js
$ git commit -m “Make console message positive”
$ git push
Sometimes, it’s not that easy…
Rebasing
Rebasing allows you to rewind the commits in one branch, pull another, and replay
them. This is really useful if you made some changes in a branch and want to
avoid having to do a merge for tiny changes.
git rebase origin/master
It also has an interactive mode that lets you do a bunch of cool things.
However, YOU MUST USE REBASE WITH CARE.
Rebasing
Rebasing essentially lets you rewrite history, and with great power comes great
responsibility.
Thanks Uncle Ben.
Being a good
git citizen
Write great commit messages
- Be descriptive.
- Use the imperative mood in the subject. (e.g Add feature, Fix bug)
- Keep the subject line to 50 characters.
- Capitalize the first letter of the subject and leave off the period.
- Line wrap the message body (extra details) at 72 characters.
Like this, but better
Use GitHub issues
- If you find a problem, submit an issue on GitHub.
- Use GitHub issues as a sort of todo list.
Issues overview
Currently open issues
Issues overview
Creating a new issue
For further reading go here!
Fin.

More Related Content

PPTX
What is working for others
PPTX
Present well
PPT
Rewriting history jost corrected
PPTX
Communicating with others
PPTX
Working with others
PPT
Speech104 extra credit
PPT
Communicating with Others
PPT
Activities Presentation
What is working for others
Present well
Rewriting history jost corrected
Communicating with others
Working with others
Speech104 extra credit
Communicating with Others
Activities Presentation

Viewers also liked (16)

DOC
Working with others
PPT
Communicating With Others
PPT
Kelab anti dadah sjk ( c ) yong 1
PPTX
Working With Other Others - Authorial Strategies 2003 - 2014
PPTX
Communicating with others slideshare
PPTX
Git rewriting git history
PPT
Communication Disorders
PDF
Achieving Work|Life Balance
PDF
Content Personalities: Working with Others without Going Insane
PPTX
Corporate social responsibilty
PPT
Definitions of communication
PPTX
Social Responsibility PPT
PPT
Small and medium scale enterprise
PPTX
work life balance ppt
PPTX
Leadership ppt
PPTX
Presentation on leadership
Working with others
Communicating With Others
Kelab anti dadah sjk ( c ) yong 1
Working With Other Others - Authorial Strategies 2003 - 2014
Communicating with others slideshare
Git rewriting git history
Communication Disorders
Achieving Work|Life Balance
Content Personalities: Working with Others without Going Insane
Corporate social responsibilty
Definitions of communication
Social Responsibility PPT
Small and medium scale enterprise
work life balance ppt
Leadership ppt
Presentation on leadership
Ad

Similar to Working with others using git and Github (20)

PPTX
MakingGitWorkForYou
PDF
Git and Github slides.pdf
PDF
Git and Github workshop ppt slide by slide
PDF
Github - Le Wagon Melbourne
PDF
Git Rebase vs Merge
PDF
Git & Github Workshop - Le Wagon Melbourne
PPTX
Technical Seminar Series: GIT Pull Requests Best Practices
PPTX
Git Repository for Developers working in Various Locations
PPT
PDF
PDF
Introduction to git, an efficient distributed version control system
PDF
Nina Zakharenko - Introduction to Git - Start SLC 2015
DOCX
GIT Rebasing and Merging
PDF
How to Really Get Git
PDF
Git Init (Introduction to Git)
PPTX
Use Git like a pro - condensed
PDF
Using Git on the Command Line
PDF
Git Anti-Patterns: How To Mess Up With Git and Love it Again
PDF
Collaborative development with Git | Workshop
PDF
Git best practices workshop
MakingGitWorkForYou
Git and Github slides.pdf
Git and Github workshop ppt slide by slide
Github - Le Wagon Melbourne
Git Rebase vs Merge
Git & Github Workshop - Le Wagon Melbourne
Technical Seminar Series: GIT Pull Requests Best Practices
Git Repository for Developers working in Various Locations
Introduction to git, an efficient distributed version control system
Nina Zakharenko - Introduction to Git - Start SLC 2015
GIT Rebasing and Merging
How to Really Get Git
Git Init (Introduction to Git)
Use Git like a pro - condensed
Using Git on the Command Line
Git Anti-Patterns: How To Mess Up With Git and Love it Again
Collaborative development with Git | Workshop
Git best practices workshop
Ad

Recently uploaded (20)

PDF
Nekopoi APK 2025 free lastest update
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
Digital Strategies for Manufacturing Companies
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PPTX
Transform Your Business with a Software ERP System
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Softaken Excel to vCard Converter Software.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Nekopoi APK 2025 free lastest update
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
CHAPTER 2 - PM Management and IT Context
VVF-Customer-Presentation2025-Ver1.9.pptx
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How to Choose the Right IT Partner for Your Business in Malaysia
Odoo Companies in India – Driving Business Transformation.pdf
Digital Strategies for Manufacturing Companies
Understanding Forklifts - TECH EHS Solution
Which alternative to Crystal Reports is best for small or large businesses.pdf
Design an Analysis of Algorithms II-SECS-1021-03
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Transform Your Business with a Software ERP System
Navsoft: AI-Powered Business Solutions & Custom Software Development
Softaken Excel to vCard Converter Software.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Operating system designcfffgfgggggggvggggggggg
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PTS Company Brochure 2025 (1).pdf.......
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...

Working with others using git and Github

  • 1. Round 3 - Jacob Jenkins Working with others™ A guide to branching, merging, and rebasing.
  • 2. Code of Conduct - Branch when creating a new feature. - Keep origin/master working. - Pull before you push. - Rebase with caution.
  • 3. Branching So, you have a super cool feature you want to add to your group’s project...
  • 4. git checkout -b super-cool-feature Now start coding!
  • 5. Branch Road Rules - Give the branch a meaningful name. - It’s alright for more than one person to work on a branch. - Make sure to pull origin/master before merging back. How do we merge our feature back into origin/master?
  • 6. Two options... 1. Merge it manually! $ git checkout master $ git merge super-cool-branch 2. If you’re using GitHub, submit a pull request! Create Pull Request
  • 10. Pull requests are also great for contributing to open source projects.
  • 11. The magic of pulling before pushing. git pull does a git fetch and a git merge. What does that mean... It means changes are applied before you commit, minimizing merge conflicts.
  • 12. Merge Conflicts - What’s a merge conflict? - How do I solve it? function superCoolFunction() { <<<<<<< HEAD console.log(“Wow, this function is cool”); ======= console.log(“Wow, this function is awful”); >>>>>>> negative-attitude In most cases, you can solve it with your editor.
  • 13. function superCoolFunction() { console.log(“Wow, this function is cool”); } $ git add supercool.js $ git commit -m “Make console message positive” $ git push Sometimes, it’s not that easy…
  • 14. Rebasing Rebasing allows you to rewind the commits in one branch, pull another, and replay them. This is really useful if you made some changes in a branch and want to avoid having to do a merge for tiny changes. git rebase origin/master It also has an interactive mode that lets you do a bunch of cool things. However, YOU MUST USE REBASE WITH CARE.
  • 15. Rebasing Rebasing essentially lets you rewrite history, and with great power comes great responsibility. Thanks Uncle Ben.
  • 16. Being a good git citizen
  • 17. Write great commit messages - Be descriptive. - Use the imperative mood in the subject. (e.g Add feature, Fix bug) - Keep the subject line to 50 characters. - Capitalize the first letter of the subject and leave off the period. - Line wrap the message body (extra details) at 72 characters.
  • 18. Like this, but better
  • 19. Use GitHub issues - If you find a problem, submit an issue on GitHub. - Use GitHub issues as a sort of todo list.
  • 22. For further reading go here! Fin.