85.4 Git Developer Workflow Pre Coding
20210924 Also see Section 85.33 and following for other workflow suggestions.
1. Clone a Repository
A generic git workflow for a team, with developers working
on specific tasks/tickets/issues, begins with a clone of
the repository. The URI identifies the repository (e.g.,
email@example.com:...) and can be obtained from
the Code button of the github repository through the browser. The
command to clone is:
git clone firstname.lastname@example.org:<owner>/<repo>.git
2. Create a Branch
For a specific task create a branch, generally from the main branch, to encapsulate the work. For a task to be completed by user kayon to add a feature to validate user input, the branch might be called kayon/validator.
We begin by ensuring the main branch is the default:
git checkout main
Next, download to the local copy any changes that have been made to the main branch in the remote repository.
git pull --rebase
git checkout -b kayon/validator git push --set-upstream origin kayon/validator
git branch kayon/validator git checkout kayon/validator
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.
Continue to the next page for the post-coding workflow.
Your donation will support ongoing availability and give you access to the PDF version of the 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.