A branch is a named line of development in a version-control repository. It isolates changes so teams can develop and test without altering code currently in use. section 12.2.1 section 12.3
A practical branch workflow separates implementation from release:
- Create a development branch from the latest main branch, then pull current repository changes before editing. section 12.3
- Commit and push changes to the development branch; the remote repository creates the branch when it does not already exist. section 12.3
- Open a pull request into main after testing, review differences and conflicts, and merge only after the changes are acceptable. section 12.3.2
- Delete the completed development branch when appropriate to avoid retaining obsolete branches after its commits reach main. section 12.3.2
Versioning a shared PowerShell module
Create develop from main, pull the latest files, change PoshAutomator.psd1 from version 1.0.0.0 to 1.0.0.1, commit, and push. Create a pull request from develop to main so reviewers can inspect the update before merging. section 12.3 section 12.3.2
git checkout -b develop Switched to a new branch 'develop' git pull origin main From https://github.com/mdowst/PoshAutomatorB * branch main -> FETCH_HEAD Already up to date.
The command sequence demonstrates creating a develop branch and synchronizing it with the current main branch before making changes. section 12.3





