A step by step of our git workflow for this phase!

Enter project directory

  1. Make sure you are in the correct root project directory using cd.

My phase-2 repo folder is located here, so yours is likely to be different since we all have our own ways of organizing things!

Check to see what branch you’re in

  1. Double Check to see what branch you are in:

I typed git branch and git branch -a and here’s what mine looks like. There are currently two branches - the default main (sometimes called master) and dev.

Switching from ‘main’ to ‘dev’ branch

We won’t be working in the main branch! Instead, we’ll be working in the dev branch.

Here I typed git checkout dev

Getting all Recent Changes on Your Local Branch

Type git pull to make sure you have all recent changes on your local branch. You want to do this every time you start to work on a new feature!

It’s automated since the lead is the one who makes the changes on their end by merging your code to the develop branch!

Note: After inputting git pull, you might see a message that says already up to date. That’s fine because it shows your branch is up do date!

Screen Shot 2023-01-31 at 8.32.07 PM.png

The branch is up to date. Yay!

Creating a new branch from the Develop Branch

We’ll have to create a new branch from the develop branch. The new branch you will be creating will be used to code a new feature or bug fix (from the Backlog). The new branch will have a specific naming convention: [your name]/[the feature you’re working on]. Afterwards, we’ll switch to it!

Examples with visuals:

Let’s say I’m tasked with setting up Next.js for the project repository: