-
Notifications
You must be signed in to change notification settings - Fork 2
Development Workflow
-
Clone the repository to your local system
git clone https://github.com/johnnymast/myio.git
-
Make sure the remote repository is pointing to the correct origin if not, add origin to the repository. Git should do this automatically when you clone the repo.
Make sure you run
git remote -v
to confirm that you can see the remote branchgit remote -v
origin https://github.com/johnnymast/myio (fetch)
origin https://github.com/johnnymast/myio (push)
If you can’t see the above, then add the remote;
git remote add origin https://github.com/johnnymast/myio.git
-
Create a feature branch in which to place changes.
When you want to start working, you will need to create a new feature branch named appropriately so other Devs can understand what you are working on. To create a new branch and check it out;
git checkout -b <new branch name>
Example;
git checkout -b setup-general-layout
-
Make changes and commit to the branch. When you are done with changes, you will add your new changes files with
git add
and commit withgit commit
-
Push the branch to the Github repository.
Once you have finished with the feature, you push your changes;
git push origin new-feature-branch
-
Submitting a Pull request. First fetch from master branch (or main repo branch to be determined) to obtain changes that have been made and merge into your feature branch.
git fetch origin
git checkout master
git pull origin master
git checkout <your feature branch>
git merge master
-
Open a pull request to the original repo.
Go to the Github page and click on the
New pull request
button. The base branch must be on the left while you feature branch should be on the right. Ensure that there are no conflict messages before proceeding. Also ensure that you select a reviewer from the right navigation before submitting or else your Pull Request will be declined automatically by Github. It will also be helpful if you can add a label as a visual aid when reviewing a list of PRs. -
Cleanup after your pull request is merged.
git pull origin master
This pulls the changes from the repository’s master branch to your local cloned repository. If you are happy with the changes, you can then proceed to delete the feature branch.
git branch -d <branch name>
Then update the master branch in your local repository.
git push origin master
You can then push the deletion of the feature branch the Github repository.
git push --delete origin <branch name>