<aside> 💡 To begin with GitHub, first, clone the repository to your computer. We can do this by opening the repository on GitHub and clicking the green Code button at the top—use whatever method works best for you! This is now your local copy.
</aside>
A more detailed version of this lifecycle is available here.
Front end: https://github.com/techfleetworks/feedback-phase-1
Back end: https://github.com/techfleetworks/feedback-be-phase-1
main
branchName the branch with your first name pre-pended, followed by the feature you will work on that coding session:
name-branchname
for example, christa-header
commit
itAs you’re working, it’s a good idea to “save your work” by committing to your branch. This can be done through VSCode, but can also be done from the terminal:
git add .
git commit -m “enter message about the changes you made here”
Pull
updates from the repoWhile you’ve been working, it’s possible that others have updated the repo with their own changes. Before merging your own updates, be sure to check for this by pulling from the repo. Make sure you note what the branch name you’re working in is called, as you’ll need to reference it later.
git checkout main
→ Moves you into the main branch.git pull
→ Pulls the live version of main
into your local copy.git checkout name-branchname
→ Moves you into your working branch.git merge main
→ Merges the new, local version of main that you just pulled into your previous working branch. ✨it’s magic✨
It’s possible that you now have a merge conflict from the updates you just pulled. This happens when another developer changed the same code you did.
<aside> 💡 Here you can choose to keep the changes you’ve made (current changes), delete your changes to accept the incoming changes, or keep both (but this will rarely be a solution except in styling instances). Please reach out to the branch owner of the incoming changes if you have questions!
</aside>
commit
your branch.
git add .
git commit -m “fixing merge conflicts”
Push
your changes