Project Durin's Folk
|
|-- Argonath - Login / Gate keeper
| |-- ..
|-- Celebdil - Backend repo
| |-- ..
|-- Dwimorberg - Database
| |-- Dimholt - Application db
| |-- Dunharrow - User Authentication
|-- Mirrormere - Frontend repo
| |-- ..
|-- Morannon - Other
|-- ..
For Developemnt run
- To start:
sh Argonath/scripts/init-setup.sh
- To stop:
sh Argonath/scripts/stop-database.sh
For Production run
- write prod start script
Best Practices:
- no lines over 140 characters
- no .* imports
- use String.format(...) if more than 1 variable in String expression
- use SOLID principles (When you can)
- don't repeat code; if you're duplicating, pull it out into it's own method
Suggestions:
- 1 space between ) and {
- never more than 1 blank line
- no blank lines at the end of a method/class
Note:
- Can use
.eslintrc.json
for auto formating - Edit the ESLint file to reflect prefered best practice changes
- Begin on local/master branch
git pull
git checkout -b yourName/newBranchName
- make changes and test changes
git add <all changes>
(git add Celebdil/src/* often works)git commit -a -m "Description of work"
git rebase -i master
ONLY IF MORE THAN 1 COMMIT IN BRANCH
- this should open a text editor
- change all commits EXCEPT the first from "pick" to "squash"
- save and exit ('Esc' then :wq in vim)
- this should bring up a second text editor
- delete all commit messages except one, leaving the one describing what your changes are
- save and exit
git checkout master
git pull
git checkout yourName/newBranchName
git rebase master
- you may need to resolve some git conflicts:
- git status will tell you the files
- edit the files to choose the changes you want
- git rebase --continue
git checkout master
git pull
- if this says 'Already up to date.' continue.
- if not return to step 10.
git merge yourName/newBranchName
git push
- You can chose to clean up your local git if you wish
git branch -d newBranchName
This will delete your old working branch
- Begin on up to date local/master branch
git checkout master
git pull
- Create your own branch to make and test changes
git checkout -b yourName/newBranchName
- Make changes and test changes
- Commit and push changes to your branch
git add <changes>
git add projectSubDirectoryName/src/*
often worksgit add -A
adds everything
git commit -a -m "Description of work"
git push
- While working on the branch keep up to date with master using merge
git checkout master
git pull
git checkout yourName/newBranchName
git merge master
- fix any merge conflicts
git push
- Create pull request
- Go to your branch on github
- Click the create pull request button
- Describe changes
- Decide if we are
squashing and merging
orsquashing and rebasing
- Wait for tests to pass
- Testing out a couple different ones to see how they work
- Recieve review (unless you're an admin)
- Click the button for whichever is decided
- Delete the old branch
git branch -d newBranchName
This will delete your old working branch- Or use the button on github
- Go back to master. rinse and repeat.
git reset HEAD^ - will undo 1 commit
If you made changes directly to your master branch:
- git stash save
- git checkout -b newBranchName
- git stash apply