SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git...

97
Git Committed BY ROB HERNANDEZ BY ROB HERNANDEZ SR. SYSTEMS ENGINEER SR. SYSTEMS ENGINEER @NEBULAWORKS @NEBULAWORKS

Transcript of SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git...

Page 1: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Git Committed

BY ROB HERNANDEZ BY ROB HERNANDEZ SR. SYSTEMS ENGINEERSR. SYSTEMS ENGINEER @NEBULAWORKS @NEBULAWORKS

Page 2: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream
Page 3: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

What is git?

Page 4: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

What is git?

~$ man git Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. ...

Page 5: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

What is git?

Its a way to manage a set of files over time

~$ man git Git is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals. ...

Page 6: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

What can git manage?

Page 7: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

What can git manage?

Text files

Page 8: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

What can git manage?

Text files

Binary files

Page 9: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

What can git manage?

Text files

Binary files

Git can be used to manage any kind of file

Page 10: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream
Page 11: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

My first PR

Page 12: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream
Page 13: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

My fix

diff --git a/salt/modules/freebsdpkg.py b/salt/modules/freebsdpkg.py index b3bfe1a3d9..63e0a4cb87 100644 --- a/salt/modules/freebsdpkg.py +++ b/salt/modules/freebsdpkg.py @@ -85,7 +85,7 @@ def refresh_db(): __salt__['cmd.run']('portsnap update') -def install(name, **kwargs): +def install(name, *args, **kwargs): ''' Install the passed package

Page 14: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

My fix

Straight forward enough

diff --git a/salt/modules/freebsdpkg.py b/salt/modules/freebsdpkg.py index b3bfe1a3d9..63e0a4cb87 100644 --- a/salt/modules/freebsdpkg.py +++ b/salt/modules/freebsdpkg.py @@ -85,7 +85,7 @@ def refresh_db(): __salt__['cmd.run']('portsnap update') -def install(name, **kwargs): +def install(name, *args, **kwargs): ''' Install the passed package

Page 15: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Resulted in

Page 16: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

To get this merged required

Page 17: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

To get this merged required

fork the git project

Page 18: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

To get this merged required

fork the git projectgit clone down the fork

Page 19: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

To get this merged required

fork the git projectgit clone down the fork

create a branch for my changes

Page 20: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

To get this merged required

fork the git projectgit clone down the fork

create a branch for my changescommit my changes

Page 21: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

To get this merged required

fork the git projectgit clone down the fork

create a branch for my changescommit my changespush up my branch

Page 22: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

To get this merged required

fork the git projectgit clone down the fork

create a branch for my changescommit my changespush up my branch

submit a pull request

Page 23: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

This was a lot for just a oneline change

Page 24: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Where to start?

Page 25: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Whose making the changes?

Page 26: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Whose making the changes?

commit 28b1edb4a5a823c910a5d86ea3514ab982bcf3d1 Author: Rob Hernandez <[email protected]> Date: Fri Feb 1 12:16:59 2019 -0800 Updates to vim dictionary

Page 27: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Configure .gitconfig

Page 28: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Configure .gitconfig

Add your name and emailgit config --global user.name "Rob Hernandez" git config --global user.email "[email protected]"

Page 29: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Configure .gitconfig

Add your name and email

config created in user's ~/.gitconfig

git config --global user.name "Rob Hernandez" git config --global user.email "[email protected]"

Page 30: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Configure .gitconfig

Add your name and email

config created in user's ~/.gitconfig

git config --global user.name "Rob Hernandez" git config --global user.email "[email protected]"

~$ cat ~/.gitconfig [user] name = Rob Hernandez email = [email protected]

Page 31: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Without a .gitconfig

Unable to identify the author

Page 32: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Without a .gitconfig

Unable to identify the authorcommit e0c03273720e088b157f53611ba4483b18d4cba6 (HEAD -> master) Author: Minion <[email protected]> Date: Sun Feb 24 12:15:31 2019 -0800 Adding a new file

Page 33: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Without a .gitconfig

Unable to identify the author

uses the info about the current user and system

commit e0c03273720e088b157f53611ba4483b18d4cba6 (HEAD -> master) Author: Minion <[email protected]> Date: Sun Feb 24 12:15:31 2019 -0800 Adding a new file

Page 34: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Bonus! Remotes will track contributions

Page 35: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

A simple git workflow

Page 36: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Find a repo

First Contributors on Github

Page 37: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Fork the project repo

Page 38: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream
Page 39: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Get the URL or SSH string of fork

Page 40: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

git workflow

Page 41: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Clone the repo down

Page 42: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Clone the repo down

~$ git clone [email protected]:sarcasticadmin/first-contributions.git

Page 43: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Clone the repo down

Navigate into the repo

~$ git clone [email protected]:sarcasticadmin/first-contributions.git

Page 44: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Clone the repo down

Navigate into the repo

~$ git clone [email protected]:sarcasticadmin/first-contributions.git

~$ cd first-contributions

Page 45: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

What did git clone do?

Page 46: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

What did git clone do?

Retrieved the source code~$ tree -L 1 . |-- CODE_OF_CONDUCT.md |-- Contributors.md |-- LICENSE |-- README.md |-- additional-material |-- assets |-- github-desktop-old-version-tutorial.md |-- github-desktop-tutorial.md |-- github-windows-vs-code-tutorial.md |-- github-windows-vs2017-tutorial.md |-- gitkraken-tutorial.md |-- package-lock.json `-- translations

Page 47: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Additionally git clone

Page 48: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Additionally git clone

Adds a remote~$ git remote -v origin [email protected]:sarcasticadmin/first-contributions.git (fetch) origin [email protected]:sarcasticadmin/first-contributions.git (push)

Page 49: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Additionally git clone

Adds a remote

Sets the default branch

~$ git remote -v origin [email protected]:sarcasticadmin/first-contributions.git (fetch) origin [email protected]:sarcasticadmin/first-contributions.git (push)

~$ git status On branch master nothing to commit, working tree clean

Page 50: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

default branch? master?

Page 51: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

default branch? master?

the fattest and longest span is the trunk(master), not the branches

Page 52: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Create a branch for your changes

Page 53: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Create a branch for your changes

~$ git checkout -b mychanges-1

Page 54: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Create a branch for your changes

~$ git checkout -b mychanges-1

~$ git status On branch mychanges-1 nothing to commit, working tree clean

Page 55: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Create a branch for your changes

We're now on our new branch

~$ git checkout -b mychanges-1

~$ git status On branch mychanges-1 nothing to commit, working tree clean

Page 56: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Lets modify the branch

Page 57: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Lets modify the branch

~$ cat << EOF >> Contributors.md - [Rob Hernandez](https://github.com/sarcasticadmin) EOF

Page 58: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Lets modify the branch

~$ cat << EOF >> Contributors.md - [Rob Hernandez](https://github.com/sarcasticadmin) EOF

~$ git status

Page 59: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Lets modify the branch

git detected a change!

~$ cat << EOF >> Contributors.md - [Rob Hernandez](https://github.com/sarcasticadmin) EOF

~$ git status

Page 60: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Stage the change

Page 61: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Stage the change

~$ git add Contributors.md

Page 62: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Stage the change

~$ git add Contributors.md

~$ git status

Page 63: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Stage the change

git staged the change!

~$ git add Contributors.md

~$ git status

Page 64: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Commit it to the branch

Page 65: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Commit it to the branch

~$ git commit -m "Add rob to Contributors list"

Page 66: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Commit it to the branch

~$ git commit -m "Add rob to Contributors list"

~$ git status On branch mychanges-1 nothing to commit, working tree clean

Page 67: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Commit it to the branch

what happened to the change?

~$ git commit -m "Add rob to Contributors list"

~$ git status On branch mychanges-1 nothing to commit, working tree clean

Page 68: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Check the git log

Page 69: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Check the git log

~$ git log

Page 70: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

git workflow

Page 71: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Push up the commit

Page 72: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Push up the commit

~$ git push origin mychanges-1

Page 73: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Pre Pull Request

Page 74: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Pre Pull Request

check repo documentation

Page 75: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Pre Pull Request

check repo documentation

check existing issues/pull requests

Page 76: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Submit the PR

Page 77: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Submit the PR

Page 78: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Submit the PR

submit against the upstream master

Page 79: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Submit the PR

submit against the upstream master

include a detailed description

Page 80: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream
Page 81: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Merged upstream

Page 82: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Merged upstream

Page 83: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Other considerations 1. Pull updates from upstream repo2. Merge conflict

Page 84: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Pull updates from upstream

Page 85: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Configure upstream

Page 86: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Configure upstream

~$ git add remote upstream https://github.com/firstcontributions/first-contribut

Page 87: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Configure upstream

~$ git add remote upstream https://github.com/firstcontributions/first-contribut

~$ git remote -v origin [email protected]:sarcasticadmin/first-contributions.git (fetch) origin [email protected]:sarcasticadmin/first-contributions.git (push) upstream https://github.com/firstcontributions/first-contributions.git (fupstream https://github.com/firstcontributions/first-contributions.git (p

Page 88: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Update master upstream

Page 89: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Update master upstream

~$ git checkout master ~$ git pull --rebase upstream master

Page 90: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Update master upstream

Always keep local master identical to upstream master

~$ git checkout master ~$ git pull --rebase upstream master

Page 91: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Other considerations 1. Pull updates from upstream repo2. Merge conflict

Page 92: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Merge conflict

Page 93: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Merge conflict

Now what?

Page 94: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Other considerations 1. Pull updates from upstream repo2. Merge conflict

Page 95: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream
Page 96: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Example repo First Contributors on Github

Page 97: SR. SYSTEMS ENGINEER @NEBULAW ORKS Git Committed · 2019. 4. 16. · ~$ git checkout master ~$ git pull --rebase upstream master. Other considerations 1. Pull updates from upstream

Thank you

ROB HERNANDEZ ROB HERNANDEZ

GITHUB: GITHUB:

@SARCASTICADMIN@SARCASTICADMIN

SARCASTICADMINSARCASTICADMIN