Git and GitHub2
Git and GitHub2
VSCode
Refers to Section 15, video #145
Git and GitHub Guide Part-2 Branching
The complete
Web Developer in 2018
Andrei's Marcy's
Little feature Bonus features branch
branch
Master
Master Branch
branch Final product
Little
feature
Branch off
master master
Note:
If something went wrong and you need to delete
the branch, type git branch -d littlefeature
The above command will delete the mistaken branch
Fix.
Type git push –set-upstream origin littlefeature
Marcy
Marcyi've
i'vechanged
changedthe
thetitle
title
What do you think?
What do you think?
Hi Andrei!
Let's compare your changes
Important Hmm..okay looks good!
At this point you as a developer I'm pulling this into the master
Little
Just need to wait for Marcy's approval. feature Okay it's merged now!
That's it. Branch off
Don't be confused by the rest of the
diagrams.
Little
rg e
feature
Me
1 commit
master master 2 commit
3 commit
Let's see
what Marcy
will probably do..
Marcy will Open-up a pull request link
Cli ck
1.
3.Click
2.Click
Hover
on
plus
sign
Hey everything Looks good!
(Click a plus sign)
1.Strat a review, add some comments, submit
the Review.
2. Click Review changes, add a comment, and
Finally click Submit review
3. Click Merge pull request, then confirm merge.
l l req u est.
il l mer ge a pu
ew
Then Sh
Pull request is now merged into the master.
Marcy can now delete littlefeature branch if she want.
Merge Conflicts 07:45 (time)
Marcy's bigfeature
Master Master
branch branch
Andrei's
Littlefeature
I want to create my Marcy will create a new branch like this
own „bigfeature“
branch. Step 1
Master Master
branch branch
Step 2
2
She then Save all...and follow the below steps 3
1
1 git add index.html
3 git push
Me
Marcy's bigfeature
rge
Master Master
d
branch branch
3 Andrei decided to
completly remove the
Andrei's
background generator title
Littlefeature 4. save all
ng
rgi
me Master
branch Master
branch
littlefeature
Important to read!
conflict master
Andrei's
Littlefeature
Marcy's bigfeature
Master has a title Ask Marcy first if she want to leave the title.
<h1>background Generator!<h1>
Master Master If yes, we can accept the Incoming changes by
branch branch clicking the Accept incoming link,Or delete
manually the following:
3 git push
Dmitry
Hey there! Our forked repo has a Configuration file
I am a forked copy We have to set it up before
Of the below repo We can sync with origin
https://github.com/zero-to-mastery/ZtM-Job-Board
Master brach Upstream area (original repo)
#Step1 Configuring a remote for a fork
Fetch == pull
Push == push
Dmitry
Dmitry
merging
Dmitry
Origin Forked repo
Done!
We now synced with the original
repository
What the hell Was that? I am a „Configuration“ file.
Okay let's try „explanation for dummies“ I can do some tricks.
But tell me what should I do.
As I had a real hard time to understand this the easy way
Okay seems like you want
To setup your fork, so it could
Without Comunicate with upstream repository.
My config file
I am a real dumbass
.Git/Config.file Aha...I can now sync all the changes
You made in original repo with the fork.
Tell me how should I
Connect a forked repo
with GitHub's origin
repo, and keep it up to
date?