Updated 047 Tutorial on forking JCB snippets so you can share your snippets with the rest of the Community (markdown)
parent
0f5be6a70d
commit
88e56f094a
@ -11,7 +11,11 @@
|
|||||||
|
|
||||||
Two things should be done. One is to fork the JCB community Snippets on GitHub and to do that you need to have a GitHub account. The second thing is to export the Snippets that you would like to contribute and add it to the Repository that you forked and cloned down to your developing environment and make commit messages on every change that you are intending to make.[00:01:03](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m03s) The next thing is to make a pull request.
|
Two things should be done. One is to fork the JCB community Snippets on GitHub and to do that you need to have a GitHub account. The second thing is to export the Snippets that you would like to contribute and add it to the Repository that you forked and cloned down to your developing environment and make commit messages on every change that you are intending to make.[00:01:03](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m03s) The next thing is to make a pull request.
|
||||||
|
|
||||||
### 1. Improving Existing Snippet 2. Move Existing Snippet To New Type 3. To Add A whole New Snippet Completely
|
|
||||||
|
|
||||||
|
### 1. Improving Existing Snippet
|
||||||
|
### 2. Move Existing Snippet To New Type
|
||||||
|
### 3. To Add A whole New Snippet Completely
|
||||||
|
|
||||||
[00:01:10](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m10s)
|
[00:01:10](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m10s)
|
||||||
This tutorial's purpose is to take you, step by step to the point where you will be ready to do a pull request
|
This tutorial's purpose is to take you, step by step to the point where you will be ready to do a pull request
|
||||||
@ -109,7 +113,7 @@ If a git status is done, we will see that it is in the deleted area and you need
|
|||||||
|
|
||||||
The next thing here is to add these new files. Do `git status`, that file has been made part of the commit, or the branch or the local files of this clone. [00:23:18](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m18s) We want to add those two other files. The first one to target is adding the `FooTable - (Table) FooTable.json` which we just removed. Do a `git status`. With that one added, give it a commit message. [00:23:47](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m47s) **Since it is so dangerous to move a snippet to another type, do make a commit message for every step.** But if you are adding like the whole new library and are contributing like 300 new snippets, it will be okay if you add all of that on the one commit message. Just ensure that it was exported via Joomla's Component Builder so that there would not be any wrong kind of code within those snippet files. At the pull request, we will scrutinize those files and have to look through them to ensure that it will not make any system unstable. [00:24:25](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m25s) It have to be policed to ensure that nothing gets merged into the master branch that will put everyone at risk. When you are making changes to one specific snippet and does not like doing many at a time, be as detailed as you can in your commit messages.[00:25:03](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m03s) The more we are aware of what you are doing, the easier it will be to merge it into the branch and to approve your pull request.
|
The next thing here is to add these new files. Do `git status`, that file has been made part of the commit, or the branch or the local files of this clone. [00:23:18](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m18s) We want to add those two other files. The first one to target is adding the `FooTable - (Table) FooTable.json` which we just removed. Do a `git status`. With that one added, give it a commit message. [00:23:47](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m47s) **Since it is so dangerous to move a snippet to another type, do make a commit message for every step.** But if you are adding like the whole new library and are contributing like 300 new snippets, it will be okay if you add all of that on the one commit message. Just ensure that it was exported via Joomla's Component Builder so that there would not be any wrong kind of code within those snippet files. At the pull request, we will scrutinize those files and have to look through them to ensure that it will not make any system unstable. [00:24:25](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m25s) It have to be policed to ensure that nothing gets merged into the master branch that will put everyone at risk. When you are making changes to one specific snippet and does not like doing many at a time, be as detailed as you can in your commit messages.[00:25:03](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m03s) The more we are aware of what you are doing, the easier it will be to merge it into the branch and to approve your pull request.
|
||||||
|
|
||||||
### git commit message update
|
### Git Commit Message Update
|
||||||
|
|
||||||
[00:25:19](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m19s)
|
[00:25:19](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m19s)
|
||||||
|
|
||||||
@ -138,14 +142,9 @@ How to keep it in sync. It says that you would open the terminal and you would d
|
|||||||
|
|
||||||
[00:32:56](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m56s)
|
[00:32:56](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m56s)
|
||||||
|
|
||||||
No changes to the master branch had been done during this tutorial. I will demonstrate the process of `git fetch upstream`. Since we did not make any changes, there would not be any great fireworks. Perhaps 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 have been changes to the upstream while you were busy working. `git checkout master` is usually the branch that you are on but just to make sure you are already on the master branch, type `git merge upstream master`. It indicates like now that it is `already up to date`. If it was not, it will merge those two branches with the changes you have made. <<<<
|
No changes to the master branch had been done during this tutorial. I will demonstrate the process of `git fetch upstream`. Since we did not make any changes, there would not be any great fireworks. Perhaps 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 have been changes to the upstream while you were busy working. `git checkout master` is usually the branch that you are on but just to make sure you are already on the master branch, type `git merge upstream master`. It indicates like now that it is `already up to date`. If it was not, it will merge those two branches with the changes you have made.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### git push - Everything You've Done Gets Pushed To Your Cloned Version On GitHub
|
### git push - Everything You've Done Gets Pushed To Your Cloned Version On GitHub
|
||||||
|
|
||||||
[00:34:00](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m00s)
|
[00:34:00](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m00s)
|
||||||
|
|
||||||
That's what you should do before you do the following: git push 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 within 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.
|
Then `git push` will now take these changes you have made and push them to `origin master`. Everything you have done, all the commits that were made, all the commit messages, the files you removed, all get 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 refresh the page, it will 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 will be dealt with in the next tutorial. So everything that has been done so far in this tutorial is to get the snippets that have been changed, the contributions you want to make to the branch that you have forked, and to do it in a way that you are not completely out of sync with the master branch which is living on vdm.io/Joomla-Component-Builder-Snippets. [00:35:19](https://www.youtube.com/watch?v=0hgHeQVTLOk&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m19s) This is the master branch that you forked. So you have got those commits in your forked branch and now want to make a pull request to merge these changes you have made into that master branch so that it will eventually become available to the whole community of JCB. If you have any issues please Google, do research.
|
Loading…
Reference in New Issue
Block a user