SlideShare a Scribd company logo
  
Berkolaborasi dengan Git
Creative Commons Attribution-ShareAlike 3.0 Unported
Fajran Iman Rusadi
https://github.com/fajran/slide-pengenalan-git
  
Kolaborasi?

A memulai proyek

B ikut serta mengubah kode→

A dan B mempertukarkan perubahan (patch)
  
Pertukaran Patch

B mengirim ke A

A perlu memberi akses tulis ke B

A mengambil dari B

B perlu memberi akses baca ke A
  
Kolaborasi Pengembangan Linux
http://www.kernel.org/pub/linux/kernel/people/gregkh/talks/kernel_devel-google-2008-06-05.pdf – Greg Kroah Hartman
  
git clone
$ git clone git://github.com/fajran/tutorial-git.git
Initialized empty Git repository in /home/iang/tutorial-git/.git/
remote: Counting objects: 6, done.
remote: Compressing objects: 100% (4/4), done.
remote: Total 6 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (6/6), done.

Menyalin repositori lain
  
git remote
$ git remote
origin
$ git remote show origin
* remote origin
Fetch URL: git://github.com/fajran/tutorial-git.git
Push URL: git://github.com/fajran/tutorial-git.git
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)

Mengatur dan memantau repositori lain
  
git remote add
$ git remote add pribadi git@github.com:fajran/tutorial-git.git
$ git remote
origin
pribadi

Menambah repositori
  
git push
$ git push pribadi master
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 299 bytes, done.
Total 3 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
To git@github.com:fajran/tutorial-git.git
19d9b61..8d8441b master -> master

Mengirim perubahan ke repositori lain
  
git pull
$ git pull origin master
From git@github.com:fajran/tutorial-git.git
* branch master -> FETCH_HEAD
Updating 19d9b61..8d8441b
Fast-forward
karedok.txt | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

Mengambil perubahan dari repositori lain

Perubahan akan langsung dipasang
  
origin? master?

origin adalah nama default untuk repositori
yang di-clone

master adalah cabang default yang aktif
  
Tujuan dan sumber
 git push origin master

Kirim cabang master di repositori lokal ke cabang
master di origin
 git pull origin master

Ambil dan pasang patch dari cabang master di
origin ke direktori kerja
  
git fetch

Menyalin repositori lain ke repositori yang
dipantau (cek git remote)

Bukan untuk membuat repositori baru seperti
git clone

git pull = git fetch + git merge
  
Selanjutnya?

Percabangan di Git
 git branch
 git checkout
 git merge
 git rebase

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Berkolaborasi Dengan Git

  • 1.    Berkolaborasi dengan Git Creative Commons Attribution-ShareAlike 3.0 Unported Fajran Iman Rusadi https://github.com/fajran/slide-pengenalan-git
  • 2.    Kolaborasi?  A memulai proyek  B ikut serta mengubah kode→  A dan B mempertukarkan perubahan (patch)
  • 3.    Pertukaran Patch  B mengirim ke A  A perlu memberi akses tulis ke B  A mengambil dari B  B perlu memberi akses baca ke A
  • 5.    git clone $ git clone git://github.com/fajran/tutorial-git.git Initialized empty Git repository in /home/iang/tutorial-git/.git/ remote: Counting objects: 6, done. remote: Compressing objects: 100% (4/4), done. remote: Total 6 (delta 0), reused 0 (delta 0) Receiving objects: 100% (6/6), done.  Menyalin repositori lain
  • 6.    git remote $ git remote origin $ git remote show origin * remote origin Fetch URL: git://github.com/fajran/tutorial-git.git Push URL: git://github.com/fajran/tutorial-git.git HEAD branch: master Remote branch: master tracked Local branch configured for 'git pull': master merges with remote master Local ref configured for 'git push': master pushes to master (up to date)  Mengatur dan memantau repositori lain
  • 7.    git remote add $ git remote add pribadi git@github.com:fajran/tutorial-git.git $ git remote origin pribadi  Menambah repositori
  • 8.    git push $ git push pribadi master Counting objects: 5, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 299 bytes, done. Total 3 (delta 1), reused 0 (delta 0) Unpacking objects: 100% (3/3), done. To git@github.com:fajran/tutorial-git.git 19d9b61..8d8441b master -> master  Mengirim perubahan ke repositori lain
  • 9.    git pull $ git pull origin master From git@github.com:fajran/tutorial-git.git * branch master -> FETCH_HEAD Updating 19d9b61..8d8441b Fast-forward karedok.txt | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)  Mengambil perubahan dari repositori lain  Perubahan akan langsung dipasang
  • 10.    origin? master?  origin adalah nama default untuk repositori yang di-clone  master adalah cabang default yang aktif
  • 11.    Tujuan dan sumber  git push origin master  Kirim cabang master di repositori lokal ke cabang master di origin  git pull origin master  Ambil dan pasang patch dari cabang master di origin ke direktori kerja
  • 12.    git fetch  Menyalin repositori lain ke repositori yang dipantau (cek git remote)  Bukan untuk membuat repositori baru seperti git clone  git pull = git fetch + git merge
  • 13.    Selanjutnya?  Percabangan di Git  git branch  git checkout  git merge  git rebase