SlideShare uma empresa Scribd logo
1 de 3
Baixar para ler offline
GeekOut Estonia 2013
Level Up Your Git and GitHub Experience
GitHub is home to over three million people who use it as the definitive place to collaborate around code. What started five years ago as
simple Git hosting is now a toolbox of collaborative features that continues to grow with new-emerging features and usages. Join Brent
Beer and Jordan McCullough as they explore tips, techniques, and GitHub workflows that will help you level up your collaborative coding
skills
Maximizing Use of GitHub
Link to issues by number as text
Mention in commit with #<issue number>
Issue auto-updated with commit reference
Pull Requests are issues
External repo issue referencing
<username>/<repo>#<number>
Issues with Commit Integration
Commit message auto close when issue mentions included
<fixes|fixed|fix> #xxx
<resolve| resolves | resolved> #xxx
<closes|close|closed> #xxx
Issues reference a Commit
Commit hash linking in issues (automatic)
Mentions in Pull Requests, Issues
@ mention account handles
Support for users and teams
Line-by-line commenting
Auto-linking in issues
Branches update automatically
GitHub-Flavor-Markdown and Task Lists
Support with - [ ] markdown
Modify and update with a click
GitHub URL Tricks
Ranges <repo-url>/compare/<ref>...<ref>
<branch>@{1.day.ago}
Commiters / Authors
<url>?author=<name>
<url>?commiter=<name>
Understanding GitHub Branch Metrics
Same as command line git branch -vv
Shows what is behind/ahead from parent and commit relationship
Resolving Auto-Merge Conflicts
GitHub.com PR cannot be completed
Resolve on command line
git ls-remote
Retrieving from same repo
Using FETCH_HEAD
Branching from
Merging from
Resolving with
Reverse Merge
Assess first with git fetch
Forks
Keeping up to date
Adding a secondary remote
Fetching (read), merging (local), pushing (write)
RefSpec & Airplane Mode
Pattern <src>:<dstn>
What’s the +
Limited what is fetched
Traditional fetch retrieves only refs/heads
Retrieve Pull Requests with git ls-remote
Retrieving with Fetch
git config remote.<name>.fetch <src:dst>
+refs/heads/*:refs/remotes/origin/*
+refs/heads/master:refs/remotes/origin/master
+refs/heads/qa/*:refs/remotes/origin/qa/*
git config --add remote.<name>.fetch <refspec>
+refs/pull/*/head:refs/remotes/origin/pull/*
Controlling Pushes
git config remote.<remote>.push <refspec>
refs/heads/master:refs/heads/qa/master
refs/heads/qa/master:refs/heads/qa/master
Gists (quick one-branch repos)
Commit on GitHub
Clone down locally
Fork, edit, share, star
pushing to multiple gists with multiple remotes. ex) git push oscon oscon:master
Cherry-Pick
git cherry-pick <ref>
git cherry -v <ref>
Verifying picks before discarding a branch
IRL Examples
Retrieving good work from prototype branches
Integrating selected commits from a Pull Request
Then use commit message fixes #<val> to auto close PR
Rebase Interactive
General use
git rebase -i <ref|ref-range>
Anticipating many commits with autosquash
git commit -i --autosquash
Configure as default on any rebase
git config rebase.autosquash
Rebase - Configurations & Shortcuts
Apply local commits on top of fetch merge
git pull --rebase <origin> <branch>
Configuration for branch rebase default on push with -u
git config branch.autosetuprebase always|never|local|remote
Specific branch rebasing behavior configuration
git config branch.<name>.rebase true
Searching, Blaming, & Responsibility
By patch content
git log -S "<content-string>"
By regex on commit message
git log --grep=<regex>
By author name or time
git log --committer=<name>
git log --since=7.months.ago
By Filter
git log --diff-filter=<A|D|M>
By File
Last commit affecting each line changed
git blame <filepath>
git blame -L<start-line>,<end-line>
Cleaning Remotes
Remove non-matching local remote branches
git remote update --prune
Remove non-matching remote upstream branches
git push <remote> --prune
Remove only remote upstream branch
git push origin :<branch-name>

Mais conteúdo relacionado

Mais procurados

Eat my data
Eat my dataEat my data
Eat my data
Peng Zuo
 
Matt Gauger - Lamp vs. the world - MKE PHP Users Group - December 14, 2010
Matt Gauger - Lamp vs. the world - MKE PHP Users Group - December 14, 2010 Matt Gauger - Lamp vs. the world - MKE PHP Users Group - December 14, 2010
Matt Gauger - Lamp vs. the world - MKE PHP Users Group - December 14, 2010
Matt Gauger
 
Make everything realtime & collaborative - JS Summit 2014
Make everything realtime & collaborative - JS Summit 2014Make everything realtime & collaborative - JS Summit 2014
Make everything realtime & collaborative - JS Summit 2014
Joseph Gentle
 

Mais procurados (20)

Git Workshop
Git WorkshopGit Workshop
Git Workshop
 
Git workshop
Git workshopGit workshop
Git workshop
 
Git training
Git trainingGit training
Git training
 
Git the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version controlGit the Docs: A fun, hands-on introduction to version control
Git the Docs: A fun, hands-on introduction to version control
 
What's new and great in Rails 3 - Matt Gauger - Milwaukee Ruby Users Group De...
What's new and great in Rails 3 - Matt Gauger - Milwaukee Ruby Users Group De...What's new and great in Rails 3 - Matt Gauger - Milwaukee Ruby Users Group De...
What's new and great in Rails 3 - Matt Gauger - Milwaukee Ruby Users Group De...
 
Tracking huge files with Git LFS (GlueCon 2016)
Tracking huge files with Git LFS (GlueCon 2016)Tracking huge files with Git LFS (GlueCon 2016)
Tracking huge files with Git LFS (GlueCon 2016)
 
Eat my data
Eat my dataEat my data
Eat my data
 
[로켓 자바] Part 1 성능 튜닝 마인드 확립
[로켓 자바] Part 1 성능 튜닝 마인드 확립[로켓 자바] Part 1 성능 튜닝 마인드 확립
[로켓 자바] Part 1 성능 튜닝 마인드 확립
 
Matt Gauger - Lamp vs. the world - MKE PHP Users Group - December 14, 2010
Matt Gauger - Lamp vs. the world - MKE PHP Users Group - December 14, 2010 Matt Gauger - Lamp vs. the world - MKE PHP Users Group - December 14, 2010
Matt Gauger - Lamp vs. the world - MKE PHP Users Group - December 14, 2010
 
Git in a nutshell
Git in a nutshellGit in a nutshell
Git in a nutshell
 
Git: from Novice to Expert
Git: from Novice to ExpertGit: from Novice to Expert
Git: from Novice to Expert
 
JDO 2019: Serverless Hype Driven Development - Grzegorz Piotrowski
JDO 2019: Serverless Hype Driven Development - Grzegorz Piotrowski JDO 2019: Serverless Hype Driven Development - Grzegorz Piotrowski
JDO 2019: Serverless Hype Driven Development - Grzegorz Piotrowski
 
Make everything realtime & collaborative - JS Summit 2014
Make everything realtime & collaborative - JS Summit 2014Make everything realtime & collaborative - JS Summit 2014
Make everything realtime & collaborative - JS Summit 2014
 
Git101
Git101Git101
Git101
 
Github
GithubGithub
Github
 
用 Kotlin 打造讀書會小幫手
用 Kotlin 打造讀書會小幫手用 Kotlin 打造讀書會小幫手
用 Kotlin 打造讀書會小幫手
 
Git & GitHub for Beginners
Git & GitHub for BeginnersGit & GitHub for Beginners
Git & GitHub for Beginners
 
ReST-ful Resource Management
ReST-ful Resource ManagementReST-ful Resource Management
ReST-ful Resource Management
 
Git real slides
Git real slidesGit real slides
Git real slides
 
Introduction To Git Workshop
Introduction To Git WorkshopIntroduction To Git Workshop
Introduction To Git Workshop
 

Semelhante a Level Up Your Git and GitHub Experience by Jordan McCullough and Brent Beer

Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
Terry Wang
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
Terry Wang
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
Victor Wong
 

Semelhante a Level Up Your Git and GitHub Experience by Jordan McCullough and Brent Beer (20)

A Quick Start - Version Control with Git
A Quick Start - Version Control with GitA Quick Start - Version Control with Git
A Quick Start - Version Control with Git
 
Git 入门与实践
Git 入门与实践Git 入门与实践
Git 入门与实践
 
Git
GitGit
Git
 
Git 入门 与 实践
Git 入门 与 实践Git 入门 与 实践
Git 入门 与 实践
 
Collaboration With Git and GitHub
Collaboration With Git and GitHubCollaboration With Git and GitHub
Collaboration With Git and GitHub
 
Git
GitGit
Git
 
Practical git for developers
Practical git for developersPractical git for developers
Practical git for developers
 
maksym vlasov - culture of git as roots of your ci
maksym vlasov - culture of git as roots of your cimaksym vlasov - culture of git as roots of your ci
maksym vlasov - culture of git as roots of your ci
 
Introduction to Git and Github
Introduction to Git and Github Introduction to Git and Github
Introduction to Git and Github
 
Gitlikeapro 2019
Gitlikeapro 2019Gitlikeapro 2019
Gitlikeapro 2019
 
Git basic
Git basicGit basic
Git basic
 
GTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSourceGTFO: Git Theory For OpenSource
GTFO: Git Theory For OpenSource
 
GDSC GIT AND GITHUB
GDSC GIT AND GITHUB GDSC GIT AND GITHUB
GDSC GIT AND GITHUB
 
Git primer
Git primerGit primer
Git primer
 
Atlanta Pm Git 101
Atlanta Pm Git 101Atlanta Pm Git 101
Atlanta Pm Git 101
 
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung FuJAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
JAZOON'13 - Bartosz Majsak - Git Workshop - Kung Fu
 
Git cheat sheet
Git cheat sheetGit cheat sheet
Git cheat sheet
 
Git Distributed Version Control System
Git   Distributed Version Control SystemGit   Distributed Version Control System
Git Distributed Version Control System
 
Hgit
HgitHgit
Hgit
 
Git & Github Workshop - Le Wagon Melbourne
Git & Github Workshop - Le Wagon MelbourneGit & Github Workshop - Le Wagon Melbourne
Git & Github Workshop - Le Wagon Melbourne
 

Mais de ZeroTurnaround

Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
ZeroTurnaround
 
Language Design Tradeoffs - Kotlin and Beyond, by Andrey Breslav
Language Design Tradeoffs - Kotlin and Beyond, by Andrey BreslavLanguage Design Tradeoffs - Kotlin and Beyond, by Andrey Breslav
Language Design Tradeoffs - Kotlin and Beyond, by Andrey Breslav
ZeroTurnaround
 
Runtime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan Sciampacone
Runtime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan SciampaconeRuntime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan Sciampacone
Runtime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan Sciampacone
ZeroTurnaround
 
Easy Scaling with Open Source Data Structures, by Talip Ozturk
Easy Scaling with Open Source Data Structures, by Talip OzturkEasy Scaling with Open Source Data Structures, by Talip Ozturk
Easy Scaling with Open Source Data Structures, by Talip Ozturk
ZeroTurnaround
 
Blast your app with Gatling! by Stephane Landelle
Blast your app with Gatling! by Stephane LandelleBlast your app with Gatling! by Stephane Landelle
Blast your app with Gatling! by Stephane Landelle
ZeroTurnaround
 
JVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir IvanovJVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir Ivanov
ZeroTurnaround
 
How To Do Kick-Ass Software Development, by Sven Peters
How To Do Kick-Ass Software Development, by Sven PetersHow To Do Kick-Ass Software Development, by Sven Peters
How To Do Kick-Ass Software Development, by Sven Peters
ZeroTurnaround
 
AST Transformations: Groovy’s best kept secret by Andres Almiray
AST Transformations: Groovy’s best kept secret by Andres AlmirayAST Transformations: Groovy’s best kept secret by Andres Almiray
AST Transformations: Groovy’s best kept secret by Andres Almiray
ZeroTurnaround
 
Tap into the power of slaves with Jenkins by Kohsuke Kawaguchi
Tap into the power of slaves with Jenkins by Kohsuke KawaguchiTap into the power of slaves with Jenkins by Kohsuke Kawaguchi
Tap into the power of slaves with Jenkins by Kohsuke Kawaguchi
ZeroTurnaround
 
Language Design Tradeoffs (Kotlin and Beyond) by Andrey Breslav
Language Design Tradeoffs (Kotlin and Beyond) by Andrey BreslavLanguage Design Tradeoffs (Kotlin and Beyond) by Andrey Breslav
Language Design Tradeoffs (Kotlin and Beyond) by Andrey Breslav
ZeroTurnaround
 
Spring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen HoellerSpring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen Hoeller
ZeroTurnaround
 

Mais de ZeroTurnaround (20)

XRebel - Real Time Insight, Faster Apps
XRebel - Real Time Insight, Faster AppsXRebel - Real Time Insight, Faster Apps
XRebel - Real Time Insight, Faster Apps
 
Redeploy chart
Redeploy chartRedeploy chart
Redeploy chart
 
Top Reasons Why Java Rocks (report preview) - http:0t.ee/java-rocks
Top Reasons Why Java Rocks (report preview) - http:0t.ee/java-rocksTop Reasons Why Java Rocks (report preview) - http:0t.ee/java-rocks
Top Reasons Why Java Rocks (report preview) - http:0t.ee/java-rocks
 
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
 
Java Tools and Technologies Landscape for 2014 (image gallery)
Java Tools and Technologies Landscape for 2014 (image gallery)Java Tools and Technologies Landscape for 2014 (image gallery)
Java Tools and Technologies Landscape for 2014 (image gallery)
 
Getting Started with IntelliJ IDEA as an Eclipse User
Getting Started with IntelliJ IDEA as an Eclipse UserGetting Started with IntelliJ IDEA as an Eclipse User
Getting Started with IntelliJ IDEA as an Eclipse User
 
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
 
DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)
DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)
DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)
 
Lazy Coder's Visual Guide to RebelLabs' Developer Productivity Report 2013
Lazy Coder's Visual Guide to RebelLabs' Developer Productivity Report 2013Lazy Coder's Visual Guide to RebelLabs' Developer Productivity Report 2013
Lazy Coder's Visual Guide to RebelLabs' Developer Productivity Report 2013
 
The State of Managed Runtimes 2013, by Attila Szegedi
The State of Managed Runtimes 2013, by Attila SzegediThe State of Managed Runtimes 2013, by Attila Szegedi
The State of Managed Runtimes 2013, by Attila Szegedi
 
Language Design Tradeoffs - Kotlin and Beyond, by Andrey Breslav
Language Design Tradeoffs - Kotlin and Beyond, by Andrey BreslavLanguage Design Tradeoffs - Kotlin and Beyond, by Andrey Breslav
Language Design Tradeoffs - Kotlin and Beyond, by Andrey Breslav
 
Runtime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan Sciampacone
Runtime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan SciampaconeRuntime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan Sciampacone
Runtime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan Sciampacone
 
Easy Scaling with Open Source Data Structures, by Talip Ozturk
Easy Scaling with Open Source Data Structures, by Talip OzturkEasy Scaling with Open Source Data Structures, by Talip Ozturk
Easy Scaling with Open Source Data Structures, by Talip Ozturk
 
Blast your app with Gatling! by Stephane Landelle
Blast your app with Gatling! by Stephane LandelleBlast your app with Gatling! by Stephane Landelle
Blast your app with Gatling! by Stephane Landelle
 
JVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir IvanovJVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir Ivanov
 
How To Do Kick-Ass Software Development, by Sven Peters
How To Do Kick-Ass Software Development, by Sven PetersHow To Do Kick-Ass Software Development, by Sven Peters
How To Do Kick-Ass Software Development, by Sven Peters
 
AST Transformations: Groovy’s best kept secret by Andres Almiray
AST Transformations: Groovy’s best kept secret by Andres AlmirayAST Transformations: Groovy’s best kept secret by Andres Almiray
AST Transformations: Groovy’s best kept secret by Andres Almiray
 
Tap into the power of slaves with Jenkins by Kohsuke Kawaguchi
Tap into the power of slaves with Jenkins by Kohsuke KawaguchiTap into the power of slaves with Jenkins by Kohsuke Kawaguchi
Tap into the power of slaves with Jenkins by Kohsuke Kawaguchi
 
Language Design Tradeoffs (Kotlin and Beyond) by Andrey Breslav
Language Design Tradeoffs (Kotlin and Beyond) by Andrey BreslavLanguage Design Tradeoffs (Kotlin and Beyond) by Andrey Breslav
Language Design Tradeoffs (Kotlin and Beyond) by Andrey Breslav
 
Spring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen HoellerSpring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen Hoeller
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

Level Up Your Git and GitHub Experience by Jordan McCullough and Brent Beer

  • 1. GeekOut Estonia 2013 Level Up Your Git and GitHub Experience GitHub is home to over three million people who use it as the definitive place to collaborate around code. What started five years ago as simple Git hosting is now a toolbox of collaborative features that continues to grow with new-emerging features and usages. Join Brent Beer and Jordan McCullough as they explore tips, techniques, and GitHub workflows that will help you level up your collaborative coding skills Maximizing Use of GitHub Link to issues by number as text Mention in commit with #<issue number> Issue auto-updated with commit reference Pull Requests are issues External repo issue referencing <username>/<repo>#<number> Issues with Commit Integration Commit message auto close when issue mentions included <fixes|fixed|fix> #xxx <resolve| resolves | resolved> #xxx <closes|close|closed> #xxx Issues reference a Commit Commit hash linking in issues (automatic) Mentions in Pull Requests, Issues @ mention account handles Support for users and teams Line-by-line commenting Auto-linking in issues Branches update automatically GitHub-Flavor-Markdown and Task Lists Support with - [ ] markdown Modify and update with a click GitHub URL Tricks Ranges <repo-url>/compare/<ref>...<ref> <branch>@{1.day.ago} Commiters / Authors <url>?author=<name> <url>?commiter=<name> Understanding GitHub Branch Metrics
  • 2. Same as command line git branch -vv Shows what is behind/ahead from parent and commit relationship Resolving Auto-Merge Conflicts GitHub.com PR cannot be completed Resolve on command line git ls-remote Retrieving from same repo Using FETCH_HEAD Branching from Merging from Resolving with Reverse Merge Assess first with git fetch Forks Keeping up to date Adding a secondary remote Fetching (read), merging (local), pushing (write) RefSpec & Airplane Mode Pattern <src>:<dstn> What’s the + Limited what is fetched Traditional fetch retrieves only refs/heads Retrieve Pull Requests with git ls-remote Retrieving with Fetch git config remote.<name>.fetch <src:dst> +refs/heads/*:refs/remotes/origin/* +refs/heads/master:refs/remotes/origin/master +refs/heads/qa/*:refs/remotes/origin/qa/* git config --add remote.<name>.fetch <refspec> +refs/pull/*/head:refs/remotes/origin/pull/* Controlling Pushes git config remote.<remote>.push <refspec> refs/heads/master:refs/heads/qa/master refs/heads/qa/master:refs/heads/qa/master Gists (quick one-branch repos) Commit on GitHub Clone down locally Fork, edit, share, star pushing to multiple gists with multiple remotes. ex) git push oscon oscon:master Cherry-Pick git cherry-pick <ref> git cherry -v <ref>
  • 3. Verifying picks before discarding a branch IRL Examples Retrieving good work from prototype branches Integrating selected commits from a Pull Request Then use commit message fixes #<val> to auto close PR Rebase Interactive General use git rebase -i <ref|ref-range> Anticipating many commits with autosquash git commit -i --autosquash Configure as default on any rebase git config rebase.autosquash Rebase - Configurations & Shortcuts Apply local commits on top of fetch merge git pull --rebase <origin> <branch> Configuration for branch rebase default on push with -u git config branch.autosetuprebase always|never|local|remote Specific branch rebasing behavior configuration git config branch.<name>.rebase true Searching, Blaming, & Responsibility By patch content git log -S "<content-string>" By regex on commit message git log --grep=<regex> By author name or time git log --committer=<name> git log --since=7.months.ago By Filter git log --diff-filter=<A|D|M> By File Last commit affecting each line changed git blame <filepath> git blame -L<start-line>,<end-line> Cleaning Remotes Remove non-matching local remote branches git remote update --prune Remove non-matching remote upstream branches git push <remote> --prune Remove only remote upstream branch git push origin :<branch-name>