The Helena High School app
- Install git bash if needed
The Git bash uses a unix file system so the following commands are useful
cd <dir>
navigates into<dir>
cd ..
navigates out a directoryls
lists the files in the current directoryrm <file>
deletes a filerm -rf <dir>
recursively deletes a directory
- Click Fork
- If prompted click your username
- Click the
clone or download
button and copy the text - On your computer open git bash navigate to the desired location to clone
git clone <paste text here>
- Note: to paste right click and select paste
cd school-app
git remote add upstream https://github.com/Helena-High/school-app.git
git pull upstream master
To pull the new changes:
- Open the git bash program
- Navigate to the school-app directory
git pull upstream master
Branches should be used when making a change. To create a branch:
- Open the git bash program
- Navigate to the school-app directory
git checkout master
git pull upstream master
git checkout -b <name of branch>
A commit should be added anytime you successfully make a change that you may want to go back to later
- Open the git bash program
- Navigate to the school-app directory
git status
- Note: this should show every file you have changed in red
git add <file or directory to add>
- Note: this command will stage all files in the directory for a commit. If you want to add everything in your present working directory
git add .
git status
- Note: this should show every file you have changed that you want to commit as green. Files you don't want to commit should be red still.
git commit -m "<Commit Message>"
After you have committed everything that you would like to push:
- Open the git bash program
- Navigate to the school-app directory
git push
- Note: If prompted type in your github username and password
- Note: If it says:
git push --set-upstream origin <your branch name>
copy and paste the command and hit enter.
After you have pushed the change you would like to Pull Request:
-
Navigate to
https://github.com/Helena-High/school-app
-
Click the pull request button
-
Type:
- <Change you made, for every change you made>
@busmith @Kuroshii @AAckerlund @sagesmith-wf @bradbenjamin-wf
-
Click the create pull request button
-
Wait for someone to with the authority (@busmith, @Kuroshii, @sagersmith8, @sagesmith-wf @bradbenjamin-wf) to merge your pull request
- Note never hit the merge button, unless you have been given permission by @busmith
- It says I need to commit or stash local changes before I can pull? If you want the changes you have made, commit the changes. If you don't want the changes type
git stash
- It came to a weird screen with a bunch of blue ~ signs and I can't do anything. You are using the vi editor, type
:q
and it should exit. If that doesn't work then you are probably in insert mode and you should hitesc
and then type:q
- It says my changes are up to date? Your changes are up to date, stop trying to pull new changes
- It says I have a merge conflict? This could be tricky, I would ask for help
- It says something about my branch being behind? Type
git pull upstream master
If none of these applied ask for help.
Run npm install -dd
from the home directory of the project
Code reviewing is a good way to pre-emptivally catch errors as well as enforce the style guide. On any open pull request feel free to click on a line and made a comment, if you think something should be changed.