...
Once you’ve created your issue, you will now create a branch to complete your issue. In your command line, navigate to your local Finishline project(view environment setup if you’re unsure how to get there). If you enter the command git branch
, it will show you the branches available and, highlighted in green, is the current branch you are on. You should be on develop, if not, run the command git checkout -b develop
. Then once again make sure you are on the correct branch, and from the develop branch, you will create a new one by running the command git branch #yourissuenumber-yourname-credits
. It is very important that you add your issue number to the beginning of your branch everytime you create a new branch. Congratulations again! You’ve You've created your first branch in Finishline and can now open it in VSCode or your preferred IDE to start coding!
...
Follow the contributor guide for specific coding practices. For this ticket, find the folder named “src”, navigate into the frontend source and then to the “pages” folder. You are currently viewing all the folders for all the code of all of the pages that you see on the website, take a look around at the code you will be getting familiar with for the rest of the semester! For this particular ticket, find the “credits” folder, and from there I will leave you to find the “names” array, and add your name and favorite color to it! To view your changes, enter “yarn start” yarn start
to start the website and in a browsers url enter “localhost"localhost:3000/credits”credits". If you get stuck along the way make sure to ask any questions in slack!
...
Once you’ve completed your ticket and are ready to submit what you have for review, go back into your command line, make sure you are still on the right branch by running git branch
, and run the command “git git add .
” which will save all the changes you’ve you've made, then run “git git commit -m
‘#YourIssueNumber '#YourIssueNumber Added my name to
credits’” Once you’ve credits'
Once you've committed your work, you must push it to the remote site by entering “git push” git push
.
Its time to create a Pull Request (PR) so that your code can be reviewed. Go to the repository and select the “Pull Requests” tab. From there, select “New pull request” and make sure that “base” is “develop” and “compare” is the branch you’ve created. Once you’ve selected your branch to compare, select “Create Pull Request.”
...
With everyone working on the same piece of code, you are almost guaranteed to encounter a merge conflict. Github will tell you if your branch has merge conflicts in your PR just beneath where it shows you whether or not you’ve passed your tests. If you do, in your local Finishline directory, run the command git merge develop
, this will bring all the changes from develop into your branch and allow you to resolve your merge conflicts. In VSCode, where you have merge conflicts, you will be presented the option to “accept incoming”, “accept current”, or “accept both”"accept incoming", "accept current", or "accept both". You will most likely simply want to press “accept both”"accept both", and that will hopefully resolve your conflict. You can then commit your changes by following the steps in “Submitting "Submitting your code”code". Check your pull request to make sure the merge conflicts are gone, and then your all set!
...