84.4 Git Developer Workflow Post Coding

3. Coding

Undertake the activity on that branch locally and commit (to share your work) regularly to the branch. Test the branch in the development environment for your deployment.

4. Prepare for Pull Request

When the body of work has been completed and tested and confirmed as ready for deployment into production, pull from the remote (origin) to your local branch to resolve any conflicts. Then commit and push your work back to the remote branch: % merge origin/main # Resync with the current main.

$ git pull --rebase                                # Retrieve latest updates from main.
$ git commit . -m "Helpful brief commit message."  # Commit changes.
$ git push                                         # Push changes to the remote repo.

5. Create Pull Request

Navigate through a browser to this branch on github and click on “Pull request” (command line alternative is to use gh). Be sure to assign a reviewer and link the pull request (PR) to the issue you’re working on if there was one.

The reviewer may make comment on the request, and may require changes before the pull request can be merged.

6. Merge Pull Request and Delete Branch

Once reviews are complete and the pull request is approved, the repository owner can then merge the request into main.

Once the PR has been merged delete the branch to keep the repository uncluttered.



Your donation will support ongoing development and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.