Skip to content
Chuk Shirley edited this page Dec 31, 2015 · 13 revisions

Git actions

  • Fork the repo
  • Clone your fork locally
	git clone https://github.com/yourGitHubUserName/repo.git
  • Optional: Add the original repo as the remote repo This is for rebasing in case changes are made to the base repo while you’re working
	git remote add base https://github.com/zendtech/IbmiToolkit.git
  • Create a local feature branch that's descriptive of the issue you're working on
	git checkout -b [branch name]
  • Commit changes locally
	git add [selection]
	git commit -m ‘[commit message]’
  • Push changes to feature branch in forked repository
	git push origin [branch name]
  • Create a pull request on the original repository that compares the original repo's master branch with your local feature branch in your forked repo.
  • Wait for pull request to be merged or feedback
  • Commit and push changes to the same branch on the same fork in order to accommodate feedback
  • Optional: Once pull request has been merged delete your local and remote branches
	git branch -D [branch name]
	git push origin --delete [branch name]

Tips for code contributions

  • Before making any changes, install Composer dependencies
	composer install
  • Make changes to code (add classes, edit config files, etc.)
  • If you add a new class, make sure to add it to the classmap autoloader in /ToolkitApi/autoload.php
  • Then use Composer to generate a new classmap by running the following command:
        composer dump-autoload
  • Run unit tests
        vendor/bin/phpunit
  • If all tests pass then commit changes
Clone this wiki locally