# December 2023 Git Flow --- For this event everyone is working on the same website so the flow will be a little different. Here is a step by step visual guide to the process. ___ ## **Step 1** --- ### Team Leads * ## Create a github organization from their personal github account ![createOrg](https://hackmd.io/_uploads/HJUZtwNE6.png) * ## Chose Free ![choseFree](https://hackmd.io/_uploads/BkGHYv4Na.png) * ## Give it a name ![nameOrg](https://hackmd.io/_uploads/ByzItwEVa.png) * ## Invite members now or skip and add later (See Step 3 if inviting later) ![inviteMembers](https://hackmd.io/_uploads/BkLqKvENT.png) * ## Now your ready to fork the repo - [BeeDev Helper](https://github.com/beedevservices/beedev-helper) ## Step 2 --- ### Team lead * ## Fork base repository into the organization ![clickFork](https://hackmd.io/_uploads/S1fkcwE4T.png) * ## Make sure to chose the Organization as owner ![changeOwnerToOrg](https://hackmd.io/_uploads/SkARFD4ET.png) * ## Keep name the same but uncheck copy main branch only ![leaveNameUnCheckBox](https://hackmd.io/_uploads/S1GJqDNET.png) * ## Verify you are in the forked repo ![verifyFork](https://hackmd.io/_uploads/ByeGyqvNEp.png) ## **Step 3** --- ### Team lead * ## Click on the people tab and then the green invite member button ![addMember01](https://hackmd.io/_uploads/SynytJKSp.png) * ## Type in the git username of a group memeber and when found click invite ![addMember02](https://hackmd.io/_uploads/Sy1BKkKBT.png) * ## Chose role, I recommend just making everyone an owner or at least have 1 other member an owner and then send the invitation ![addMember03](https://hackmd.io/_uploads/SykBYktBa.png) * ## Once you see this screen the invite is sent and it is up to the team member to accept the invite ![addMember04](https://hackmd.io/_uploads/HkJSFkKBa.png) ## Developers * You should have an email with the invitation be sure to click this link within the next 7 days * Sometimes you may see a notification in your github that you have this invite. ## Everyone * As organizations are much like github id's they will all have different names so you can be a part of any and all of them for this event. ## **Step 4** --- ### Developers - git clone ![gitClone](https://hackmd.io/_uploads/r1eR0YwENT.png) - cd into repo ![cdRepo](https://hackmd.io/_uploads/HJC0FwV4a.png) - change to the dev branch as this will be your base ![checkoutDev](https://hackmd.io/_uploads/rkCRKwNVT.png) - make a new branch for your feature ![newBranch](https://hackmd.io/_uploads/SyxJ9PVVT.png) - used git status to show that changes to files were made (in red) ![changesMade](https://hackmd.io/_uploads/B10RtPNN6.png) - add files to the "package" to go to github ![gitAdd](https://hackmd.io/_uploads/H111cPVNT.png) - commit or "seal the box" with a message ![gitCommit](https://hackmd.io/_uploads/SykyqDVV6.png) - push your changes to the team repo ![gitPushOrigin](https://hackmd.io/_uploads/HyW1cw4V6.png) ## **Step 5** --- Feature complete ready for development testing ### Developers - Create a pull request - Make sure that you are on the same repo so change the base (will be on the left back to your team repo name) - It should have dev branch on left and your feature branch on right ![pullRequestToTeamDev](https://hackmd.io/_uploads/HyezJ5PN4p.png) - after clicking creat pull request fill out the form and create the PR ![fillOutForm](https://hackmd.io/_uploads/ryMJ9vVEa.png) - PR is now ready for the lead ![prReadyForLead](https://hackmd.io/_uploads/rJWk9wNVa.png) ## **Step 6** --- ### Team Leads - click on pull requests ![featureDoneLeadPullReqToBaseDev](https://hackmd.io/_uploads/SkWy9PNNT.png) - If all looks good merge the request ![leadMerge](https://hackmd.io/_uploads/S1eM19vEVT.png) - As a double check now confirm it ![leadConfirm](https://hackmd.io/_uploads/SJx-15vVEa.png) ## **Step 7** --- ### Team Leads - Feature is done (try to do this every feature not multiple) - create a new pull request ![featureDoneLeadPullReqToBaseDev](https://hackmd.io/_uploads/SkWy9PNNT.png) - Be sure to have the base repo (beedevservices) Dev branc on left and team repo dev branch on right ![teamDevToBaseDevCreatePR](https://hackmd.io/_uploads/SkfJ9P4V6.png) - Follow same steps as in step 5 to create the request - Post in the pull-request-status channel that you have made a PR (see pinned post in channel for exampl) ![prApprovalRequested](https://hackmd.io/_uploads/HkQISOVVT.png) ## **Step 8** --- ### Event Leads - Verify and approve pull requests into base Repo Dev branch - Once merged on the base repo anyone can now click deployements and click the latest one live through github pages ![baseDevPRGoodSeeDeploy](https://hackmd.io/_uploads/rJRCYwENp.png) - All github users that touch the repo will be added as a collaborator to the main website once dev gets pushed to main at the end of the event. Then you can see your name on the about page - Update the status of the PR in the channel and tag @channel (see pinned post in channel for example) ![prApproved](https://hackmd.io/_uploads/r1pdBdVV6.png) - This announcement should then trigger ALL teams to complete step 8 [BeeDev Helper Site](https://helper.beedev-services.com) [About page](https://helper.beedev-services.com/about) ## **Step 9** --- ### **Team Leads** * ## After any pull requets to base dev have been approved the following steps need to be completed to ensure your team has all of the latest code * ## Make sure you are in your teams repo * ## You may see that your version is out of sync and a sync fork drop down ![LeadUpdateFromBasePart1](https://hackmd.io/_uploads/Hkz15P4E6.png) * ## Change to your teams dev branch then click that drop down and update branch ![devBranchSyncUpdate](https://hackmd.io/_uploads/SkzkcPN4T.png) * ## Once this is done make sure all developers follow the steps below ### **Developers** - Once the above has been done developers need to complete the following steps - switch to the dev branch and pull down all updates ![changeToDevPullFromDev](https://hackmd.io/_uploads/HJykqvEV6.png) - change back to your branch if just getting updates and pull from team dev branch. If your feature was complete you can just create a new branch from the team dev ![pullFromTeamDev](https://hackmd.io/_uploads/rJM15v4VT.png)