Coder Social home page Coder Social logo

scalabledaytrader_seng468's Introduction

ScalableDayTrader_SENG468

A scalable day-trading system for "Software System Scalability" course

Development

Getting started:

Optional: make a code folder in your home directory. This will simplify shared scripts.

cd ~
mkdir code

Clone the repo:

cd ~/code
git clone https://github.com/imagineer6/ScalableDayTrader_SENG468.git

Git Workflow:

A branching workflow keeps things sane when multiple devs are working on the same codebase.

  • A branch should represent the smallest atomic addition of functionality (ideally).
  • In order to stay up to date, rebase your branch onto origin/master often.
  • In order to keep others up to date, and reduce merge conflicts on your behalf, don't merge your branch as soon as possible, adhere to the first point (within reason).
  • We will use a rebasing workflow to keep our master branch linear.
Starting new unit of work (branch):
git checkout master
git fetch

# Note: make sure you are now on master, and do not have any work on master, because the next step will nuke it. Use `git stash` before-hand if you do.
git reset --hard origin/master 
git checkout -b 'branch-name-goes-here'
Checking the staging area:

Git performs action on files that have been placed in the staging area, which acts as a triage. To see what files are in the staging area:

git status
To add a file/directory to the staging area:
# To add a single file
git add some_file.py

# To add every file in the current directory:
git add .
To commit, i.e. save files in staging area to the local git repo:
git commit -m "A <50 char title describing WHAT functionality the commit adds

An optional message body describing WHY.  Note: the commit should not go into 
the WHATs of specific details, as it is redundant, since this is what the commit is storing"

NOTE: Commit Message Best Practices

NOTE: Do not commit compilation artifacts, editor config files, and random junk.

To push your branch to the remote repository (gitHub):
git push origin branch-name 
To merge your work into master:

Note: We use a no-ff merge because we have rebased onto master (so that that our master branch stays linear), and we want to generate a merge commit for clarity/posterity. The message has the form "Merge branch ..." so that it is easy to spot merge commits in the log.

git checkout your-branch-to-merge
git fetch
git rebase origin/master

#Note: if you have merge conflicts at this stage, you will need to fixt them.  After, repeat from the beggining.
git checkout master

# Note: make sure you are now on master and do not have any work on master, because the next step will nuke it.
git reset --hard origin/master
git merge --no-ff 'your-branch-name' -m "Merge branch 'your-branch-name'"
git push origin master
NEVER DO THIS:

Never edit public history. You can always edit/change local and remote history on your own branches (using commit amending, interactive rebasing, resetting, force pushing, etc.). However, you should NEVER change history on remote/origin/master, and you should never edit other people's branches. (Unless you really know what you are doing and have the author's permission).

Appendix:

Other useful git commands:

# See log of git commits:
git log

# See branches:
git branch

# Selectively add to staging area:
git add your-file -p

# To see what parts of the file have chaged:
git diff
git diff .
gif diff your-file.py

# Interactive Rebase For Changing History (only change your own history):
git rebase -i <commit hash, ie 23lk2j34lk23lk4>

# To add changes to your last commit:
git add Changed_file.py
git commit --ammend

scalabledaytrader_seng468's People

Contributors

repo246 avatar jkellys avatar

Stargazers

Brandon Francoeur avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.