-
Go to your terminal and navigate to the directory where you keep all your Lambda School assignments
-
git clone https://github.com/CSPT1-TEAMS/ current_sprint
-
The following is for only one member of the pair (maybe whoever is going to drive first)
- Create a branch using the following naming
git checkout -b team-(my team))_(my-name)-and-(pair’s-name)
*
yarn install
(each person may as well do this)- both people should also follow the setup as described in the readme file as well
- then
git push origin <your branch-name>
- begin to work on the sprint with your pair as you normally would
- remember to commit often!!
- When you want to switch roles
- the driver should make any final commits
- and be sure to
git push origin <your_branch_name>
and NOTmaster
*An example pair branch would look like "team-b_greg-and-wesley"
- After the original driver has made the final push to the pair branch, the new driver should just need to type the following commands in the directory where the current sprint is located
git checkout <team_branch_name>
git pull origin <team_branch_name>
- This will check out the new driver into the team branch followed immediately by updating (or pulling) the code from Github.
- Commit all your files
- Then run the following commands in your terminal
git checkout master
git pull origin master
git checkout <your_branch>
git merge <your_branch> master
Soon, we will cover more branching along with submitting a pull request into the dev branch of the team repository.
Here are some resources that cover some of these ideas:
- Excellent Stack Overflow Post
- Pro Git online book about everything you'd ever want to know about git.
- And a chapter specifically about Branching