GitHub workflow for single clone

The following image illustrates the workflow for using Git and GitHub to add or change content using a working branch for a single repository. The step shown in red is a one-time action for each machine you work on. The numbered steps (in black) are described in the table below.

Single clone GitHub workflow Single clone GitHub workflow

StepsDescription of stepsGit command / GitHub actions
AClone the repo (once per machine)git clone https://github.com/<your-account>/PSModuleProject
0Checkout the main branchgit checkout main
1Sync the main branchgit pull origin main
2Create a new working branchgit checkout -b v1release
3Create new contentUse VS Code to create or edit files
4Add changes for Git trackinggit add -A
5Commit changes to local repogit commit -m 'commit message'
6Push working branch to origingit push origin v1release
7Submit pull requestGo to https://github.com/<your-account>/PSModuleProject/pulls and click the New pull request button. Base repository: your-account/PSModuleProject base: main <– head repository: your-account/PSModuleProject compare: v1release Fill out the pull request description and click Submit.
8PR is reviewedMake the necessary changes based on the review feedback.
9PR is mergedGo to step 10
10Cleanup unneeded branch infogit checkout maingit push origin --delete v1releasegit branch -D v1releaseThe git push command deletes the branch in your fork and deletes the tracking branch from your local repo. The git branch command delete the branch from your local repo.
11Start new postGo to step 0