-
Notifications
You must be signed in to change notification settings - Fork 1
Home
petebachant edited this page Nov 22, 2014
·
36 revisions
- Get Git. You can either download Git for Windows (recommended) or GitHub for Windows.
- Set up Git.
- Open the Windows start menu, type
Git Bash
and press enter. A terminal window will appear. - Tell Git your name by executing
git config --global user.name "John Smith"
- Set your email address
git config --global user.email "[email protected]"
- Open the Windows start menu, type
- Download, or clone, a local version of the RM2-tow-tank repository.
- Open Windows Explorer and navigate to a directory you'd like the
RM2-tow-tank
folder to live, e.g.My Documents/Experiments
- Right click on the Windows Explorer background and select
Git Bash
. This will open up a terminal window. - 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 theRM2-tow-tank
folder.
- Open Windows Explorer and navigate to a directory you'd like the
- 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 namedjohn
. - 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. - Take a look at the changed files by executing
git status
, then usegit diff
to show the lines in each file that changed. - 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"
- Upload, or push the commit back to GitHub. If you created your own branch, use
git push -u origin john
(replacingjohn
with your branch name of course). If you're working on the master branch, usegit 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 typegit push
. - Repeat steps 5--8 until you have nothing more to change.
- 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.
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.