... | ... | @@ -2318,13 +2318,123 @@ in your web browser. |
|
|
git config user.name "tkennedy@cs.odu.edu"
|
|
|
```
|
|
|
|
|
|
*Note:* I prefer to set my name and email for each repo. If you want to set
|
|
|
*Note:* I prefer to set my name and email for each repos. If you want to set
|
|
|
your name and email globally (i.e., for all repos) add `--global` after
|
|
|
`git config`.
|
|
|
|
|
|
|
|
|
### Adding Some Code
|
|
|
|
|
|
Since this is a git workshop (and not a programming workshop) we will use the
|
|
|
code examples from
|
|
|
[a CS 417 Python non-linear solver discussion](https://www.cs.odu.edu/~tkennedy/cs417/s20/Public/solverDiscussion/)
|
|
|
to simulate writing code.
|
|
|
|
|
|
Before we add code... two files should be added:
|
|
|
|
|
|
1. `.gitignore` - a set of file patterns to ignore.
|
|
|
2. `README.md` - a description of the program, its dependencies, and how to
|
|
|
run the program.
|
|
|
|
|
|
|
|
|
#### .gitignore
|
|
|
|
|
|
We will start with a `.gitignore` file. This file should always be added first!
|
|
|
Since we will be working with Python code... our `.gitignore` will be short.
|
|
|
|
|
|
```
|
|
|
# General Ignore Rules
|
|
|
**.zip
|
|
|
**.pyc
|
|
|
**/docs
|
|
|
|
|
|
# Python Disttools
|
|
|
MANIFEST
|
|
|
|
|
|
# Python Tox
|
|
|
**.tox
|
|
|
```
|
|
|
|
|
|
These rules will depend on the language (or languages you are using). You will
|
|
|
probably end up adding a few rules to ignore files generated by your IDE or
|
|
|
editor.
|
|
|
|
|
|
My CS 330 Review Repository has fairly long set of rules.
|
|
|
|
|
|
<details>
|
|
|
|
|
|
<summary>CS 330 .gitignore File</summary>
|
|
|
```
|
|
|
# General Ignore Rules
|
|
|
**/documentation/
|
|
|
**.o
|
|
|
**.exe
|
|
|
**.zip
|
|
|
**.class
|
|
|
**.jar
|
|
|
!**gradle/wrapper/*.jar
|
|
|
**.pyc
|
|
|
**/docs
|
|
|
|
|
|
# Binary Specific Ignore rules
|
|
|
**/ll2
|
|
|
**leak.out*
|
|
|
**storage
|
|
|
**runShapes
|
|
|
**runshapes
|
|
|
**updateRoom
|
|
|
**registration
|
|
|
**pointerReview
|
|
|
|
|
|
**/build/
|
|
|
**/.gradle/
|
|
|
|
|
|
# Assignment Ignore Rules
|
|
|
**Assignment-0*
|
|
|
|
|
|
# Eclipse Project Ignore Rules
|
|
|
**.project
|
|
|
**.settings
|
|
|
**.classpath
|
|
|
|
|
|
# Latex Ignore Rules
|
|
|
**.aux
|
|
|
|
|
|
# Scratch (temp) File & Directory Ignore rules
|
|
|
Scratch
|
|
|
**.bak
|
|
|
|
|
|
# Vim rules
|
|
|
**.swp
|
|
|
|
|
|
# Python Coverage (coverage.py) Rules
|
|
|
**/.coverage
|
|
|
**/htmlcov
|
|
|
|
|
|
# Python Disttools
|
|
|
MANIFEST
|
|
|
|
|
|
# Python Tox
|
|
|
**.tox
|
|
|
|
|
|
# Style Check reports
|
|
|
**style-check*
|
|
|
|
|
|
# Rust
|
|
|
**/target
|
|
|
|
|
|
# output comparison
|
|
|
**/out-Rust.txt
|
|
|
**/out-rust.txt
|
|
|
**/out-cpp.txt
|
|
|
|
|
|
# Gcovr rules
|
|
|
**/source/*.html
|
|
|
**.gcda
|
|
|
**.gcno
|
|
|
|
|
|
```
|
|
|
</details>
|
|
|
|
|
|
---
|
|
|
|
... | ... | |