Skip to content
petebachant edited this page Nov 22, 2014 · 36 revisions

How to work on this project (on Windows)

As a collaborator (read/write access)

  1. Get Git. You can either download Git for Windows (recommended) or GitHub for Windows.
  2. Set up Git.
    1. Open the Windows start menu, type Git Bash and press enter. A terminal window will appear.
    2. Tell Git your name by executing git config --global user.name "John Smith"
    3. Set your email address git config --global user.email "[email protected]"
  3. Download, or clone, a local version of the RM2-tow-tank repository.
    1. Open Windows Explorer and navigate to a directory you'd like the RM2-tow-tank folder to live, e.g. My Documents/Experiments
    2. Right click on the Windows Explorer background and select Git Bash. This will open up a terminal window.
    3. Enter git clone https://github.com/UNH-CORE/RM2-tow-tank.git. Note that right-clicking in the terminal window will paste from the clipboard. Git will download all the files and put them in the RM2-tow-tank folder.
  4. Optional: Create your own branch. This will be your own version of the files that you can work on, and save new versions of, without changing the master branch. Name the branch after yourself or a feature you're working on, e.g., git checkout -b john. This will create a new branch named john.
  5. Edit some file(s). Make a change or set of changes that address one particular addition or issue you are trying to fix. For example, you could add a paragraph to Documents/Test plan/testplan.tex describing how measurement uncertainty will be calculated.
  6. Take a look at the changed files by executing git status, then use git diff to show the lines in each file that changed.
  7. If everything looks right, add the files to a commit and give it a message describing the changes: git commit -am "Add paragraph about turbine performance measurement uncertainty"
  8. Upload, or push the commit back to GitHub. If you created your own branch, use git push -u origin john (replacing john with your branch name of course). If you're working on the master branch, use git push -u origin master. Note that the -u tells Git that you always want to push to that particular branch, so in the future you can just type git push.
  9. Repeat steps 5--8 until you have nothing more to change.
  10. If you created your own branch, create or comment on an issue in the issue tracker suggesting that your changes get merged into the master branch. You can find the ID of your commit by looking at the list on GitHub, or typing git log in the working directory.

Why do it this way?

With Git, everyone on the project can work in parallel, pulling (git pull) in and merging changes at any point in time. There's no need to stop and wait for people to finish their contributions, email large files back and forth, and try to keep track of version numbers.

Clone this wiki locally