Updated 047 Tutorial on forking JCB snippets so you can share your snippets with the rest of the Community (markdown)
parent
f0ebd0acad
commit
a5afc1ae93
@ -85,4 +85,12 @@ This is where we want to do a few more things [00:28:06](https://www.youtube.com
|
||||
|
||||
### Syncing A Fork (See Video) [00:31:01](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m01s)
|
||||
|
||||
Now let's go see how to keep it in sync. It says that you would open the terminal and you would do git fetch upstream. It will pull down this and make sure that there is a branch called upstream master. Then you would check out master and switch to the master branch and do a merge upstream master. Which if while you were busy doing the snippets improvements and things [00:31:30](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m30s) And there's been commits to the master branch You wanna make sure That you Actually before pushing all this upstream Before making a pull request that you first merge The already changes from the master branch Into your branch and then make your commits on top of that This will help to try and avoid You not having specific commits in your branch I know it gets a little bit complicated [00:32:01](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m01s) but If you get stuck We will most of the times be able to just help you Figure this out again But like I explained in the beginning To know how to work with git Is really your responsibility So that You when you are wanting to communicate or sorry to Share with the community snippets [00:32:23](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m23s) You know how to first make a pull Request a sorry merge Your upstream with your master branch And ensure that you are up-to-date with that before making a push to your branch and Yes I hope you understand anyway if you don't please Google it and do some homework to get you Git Knowledge all freshened up and ready Now I know we didn't make any changes to the master branch during this tutorial So [00:32:56](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m56s) I can demonstrate the process of Git Fetch Upstream And it will do that But since I know that we didn't actually make any changes In the end of the day We we will not be Really seeing any Great fireworks happening right now And I suppose some of you will experience it a little different [00:33:22](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m22s) Especially if there's been changes to the upstream while you have been working So Git checkout master It's usually the branch that you're on but just to make sure You're already on the master branch Then Git Merge Oops I missed out the git there [00:33:44](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m44s) Merge upstream master And it says like now it's already up to date If it wasn't it will actually Merge those two branches With the changes you've made Now That's what you should do before you do the following Git push [00:34:09](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m09s) Which will now take these changes you've made And you wanna push them to origin origin master Now Everything you've done All the commits you made all the commit messages the files you removed All of that now gets pushed up To your cloned version On GitHub [00:34:36](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m36s) So if we go to your version now on GitHub And we just refresh the page It'll say This branch is for commits ahead of VDM-io master Which means you are now ready To make a pull request A pull request is what we will deal with in the next tutorial So everything we've done so far and this tutorial is to get the snippets that you've changed the contributions You wanna make Into the branch that you forked [00:35:10](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m10s) And to do it in a way that you're not completely out of sync With the master branch Which is living Basically on VDM dot IO Joomla component Builder snippets This is the master branch that you forked So you've got those commits in your forked branch And now you want to actually make A pull request To much these changes you've made into that master branch [00:35:36](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m36s) So that it will eventually become available To the whole community of JCB Okay thank you for watching If you have any issues Please Google Do research Git is an amazing technology and The quicker you can Get your hands on it and Become [00:35:59](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m59s) Comfortable with working with it the better Okay Next tutorial we'll deal with the pull request
|
||||
Now let's go see how to keep it in sync. It says that you would open the terminal and you would do git fetch upstream. It will pull down this and make sure that there is a branch called upstream master. Then you would check out master and switch to the master branch and do merge upstream master. Which if while you were busy doing the snippets improvements and things [00:31:30](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m30s) and there's been commits to the master branch, you want to make sure that before pushing all this upstream, before making a pull request, that you first merge the already changes from the master branch into your branch and then make your commits on top of that. This will help to avoid not having specific commits in your branch. I know it gets a little bit complicated [00:32:01](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m01s) but if you get stuck, we will most of the times be able to help you figure this out again. But like I explained in the beginning to know how to work with git Is really your responsibility so that when you are wanting to share with the community snippets. [00:32:23](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m23s) You must know how to merge your upstream with your master branch and ensure that you are up-to-date with that before making a push to your branch. I hope you understand. If you don't please Google it and do some homework to get your Git knowledge all freshened up and ready. I know we didn't make any changes to the master branch during this tutorial. [00:32:56](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m56s)
|
||||
|
||||
### git fetch upstream - git checkout master - git merge upstream master
|
||||
|
||||
I can demonstrate the process of git fetch upstream and it will do that. But since I know that we didn't make any changes, in the end of the day we we will not be really seeing any great fireworks happening right now. I suppose some of you will experience it a little different [00:33:22](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m22s) especially if there's been changes to the upstream while you have been working. git checkout master is usually the branch that you're on but just to make sure you're already on the master branch. Then git merge upstream master. [00:33:44](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m44s) It says like now it's already up to date. If it wasn't it will merge those two branches with the changes you've made.
|
||||
|
||||
### git push -Everything You've Done Gets Pushed To Your Cloned Version On GitHub
|
||||
|
||||
That's what you should do before you do the following: git push [00:34:09](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m09s) which will now take these changes you've made and you want to push them to origin master. Everything you've done, all the commits you've made, all the commit messages, the files you removed, all of that now gets pushed up to your cloned version on GitHub. [00:34:36](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m36s) If we go to your version on GitHub and we refresh the page, it'll say: This branch is 4 commits ahead of vdm-io:master. Which means you are now ready to make a pull request. A pull request is what we will deal with in the next tutorial. So everything we've done so far in this tutorial is to get the snippets that you've changed, the contributions you want to make into the branch that you forked, [00:35:10](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m10s) and to do it in a way that you're not completely out of sync with the master branch which is living on vdm.io/Joomla-Component-Builder-Snippets. This is the master branch that you forked. So you've got those commits in your forked branch and now you want to make a pull request to merge these changes you've made into that master branch [00:35:36](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m36s) so that it will eventually become available to the whole community of JCB. If you have any issues please Google, do research. Git is an amazing technology and the quicker you can get your hands on it and become [00:35:59](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m59s) comfortable with working with it the better. Next tutorial we'll deal with the pull request.
|
||||
|
Loading…
Reference in New Issue
Block a user