Skip to content

Commit 9600d4a

Browse files
authored
Merge pull request #2 from develop-me/release/0.3.0
Release/0.3.0
2 parents 435d319 + ed13658 commit 9600d4a

46 files changed

Lines changed: 1343 additions & 405 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
Tooling: doing things better, faster, smarter
44

55
- Day 1: Git
6-
- [Presentation](https://docs.google.com/presentation/d/15Z03saKItEj1Tc5d__tXk3uIguPqHvcFIA1Bd2WUffs/edit?usp=sharing)
6+
- [Presentation](https://docs.google.com/presentation/d/1QjsZpJ7uY3tX9WdiSXrmwnDNYqWG1BwUBgY8Yez86F4/edit?usp=sharing)
77
- [Template Repo](https://github.com/develop-me/git-simple)
88
- [Challenges](challenges/01/README.md)
99
- Day 2: Git Workflows
1010
- [Challenges](challenges/02/README.md)
1111
- Day 3: npm & gulp
12-
- [Presentation](https://docs.google.com/presentation/d/13nRo3vZhvsJ5YN5QMp3puS7LQBQvj0qPnePJny3RqjY/edit?usp=sharing)
12+
- [Presentation](https://docs.google.com/presentation/d/1EzJYbdqaeqohi9ClAdS40XKy9XQyTmGlEi3q64_Q_SY/edit?usp=sharing)
1313
- [Demo](https://github.com/develop-me/gulp-demo)
1414
- [Project template](https://github.com/develop-me/gulp-template)
1515
- [Challenges](challenges/03/README.md)

challenges/01/01-setup.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,21 @@
22

33
1) **Create a new project folder with the command line**
44

5-
Use `cd {directory name}` and `mkdir {my new folder}` to navigate to where you'd like to make your new directory and make it.
5+
Use `cd {directory name}` to navigate to where you'd like to make your new directory
6+
7+
Use `mkdir {my new folder}` to make your new directory.
68

7-
_Protip: you can drag a file or folder from Finder (Mac) or Explorer (Windows) into terminal to get the full path rather than typing the whole path._
9+
_Protip: you can drag a file or directory from Finder (Mac) or Explorer (Windows) into terminal to get the full path rather than typing the whole path._
810

911
1) **Start to version manage that new folder**
1012

11-
Use `git init` inside your new folder (`cd` into the folder first!) to start version managing the project.
13+
`cd` into your new directory first
14+
15+
Use `git init` inside your new folder to start version managing the project.
1216

1317
1) **Check your Git repository is in place**
1418

15-
Verify the `.git` directory has been created and Git is ready to go.
19+
Verify the `.git` directory has been created inside your project directory - this tells you that Git is ready to go.
1620

1721
There are a few ways of doing this:
1822

challenges/01/02-track-files.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,20 @@
1212
scripts.js
1313
```
1414

15+
You can use `touch {filename}` to create files from the command line and `mkdir {dirname}` to create directories.
16+
17+
When you run these commands take care that you are in the right directory in your terminal.
18+
1519
1) **Start version managing your files**
1620

1721
Use `git status` to see what Git thinks is going on.
1822

19-
Use `git add {filename}` to start tracking the files in your project.
23+
Use `git add {filename}` to start tracking individual files in your project.
2024

21-
Note: you will need to use the full path, e.g. `git add css/style.css`
25+
Note: you may need to use the full path, e.g. `git add css/style.css`
2226

2327
Use `git status` again to see what is the status now.
2428

25-
Use `git commit -m "A meaningful commit message"` to create your first commit, with the files you had previously added to tracking.
29+
Use `git commit -m "Basic project files created"` to create your first commit, with the files you had previously added to tracking. You can change the suggested commit message if you like to come up with something more meaningful.
2630

2731
## [Next challenge >](03-changes.md)

challenges/01/03-changes.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,24 @@
1212

1313
Use `git commit -m "A useful comment"` to create your next commit, with the files you had previously added to tracking.
1414

15-
1) **Make some more changes**
15+
1) **Make changes to several files at one**
1616

17-
Edit 2 or more files, `git add` and commit the changes.
17+
Edit 2 or more files at a time, use `git add` to add them and then commit them. You should have multiple files in one commit.
1818

19-
## [Next challenge >](04-info.md)
19+
1) **Use `git log` to see the recent changes in your project.**
20+
21+
Study the information and try to relate to the changes you've made and commands you've run.
22+
23+
If your history is too long for your terminal window you'll end up with a `:` prompt at the bottom, as you can use your cursor to go up and down the log. Use `q` to quit.
24+
25+
1) **Put an emoji in the slack channel so your instructor knows you're done.**
26+
27+
## Advanced challenges
28+
29+
These are optional challenges you can do if you finish quickly.
30+
31+
1) **See differences**
32+
33+
Make a change to a file, save it and use git diff to see how you can use the diff tool to see what has changed.
34+
35+
Useful if a git status shows things have been modified but you're not sure what or can't remember what you changed.

challenges/01/04-info.md

Lines changed: 0 additions & 36 deletions
This file was deleted.

challenges/01/04-simple-project.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Build a simple site
2+
3+
This exercise is to help you practice using Git and to get you used to thinking about how to divide your work into sensible commits.
4+
5+
**Read through ALL the instructions at least once before you start work** - this will help you plan sensible chunks of work that will form your commits.
6+
7+
- start a new project (new folder, new Git repo)
8+
- create 3 HTML pages (home, about and contact) each with normal HTML boilerplate: `<html>`, `<head>` and `<body>`.
9+
- add at least HTML 4 elements to each page `<div>`, `<h1>`, `<p>`, `<img>`
10+
- create a `css` folder with stylesheet
11+
- create a `img` folder with image(s)
12+
- populate with some dummy content eg images
13+
14+
At appropriate points use `git add` and `git commit` to create a snapshot of your progress so far. This may be after creating each page, or when completing each element, this is up to you. Ensure your commit names are meaningful.
15+
16+
- At the end you should aim to have done **at least** 8 commits (use `git log` to see your commits so far)
17+
- Aim for clear, informative commit messages.
18+
19+
*Note: Don't worry about making your web pages perfect, the purpose is to practice using Git.*
20+
21+
### After you have finished
22+
- Emoji the task on Slack so the instructor knows you have finished.
23+
- Share a summary of your commit messages on Slack.
24+
25+
### Stretch challenges
26+
Only attempt these once you have done all of the above.
27+
28+
If you have time you could:
29+
30+
- add some CSS styling
31+
- experiment with the -a flag in git commit -am (in the notes PDF box on "git commit arguments")
32+
- complete the advanced challenge: [Moving files the git way >](05-move-files.md)
33+
- complete the advanced challenge: [Deleting files the git way >](06-remove-files.md)
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Moving/renaming files
22

3+
This is an advanced task - if you have questions or help please ask your instructor or TA for help outside of the main lectures. The main class will not wait whilst you attempt these.
4+
35
1) **Use `git mv {old-path} {new-path}` to relocate a file**
46
This stages that change at the same time.
57

@@ -15,4 +17,4 @@
1517

1618
Commit the change.
1719

18-
## [Next challenge >](08-remove-files.md)
20+
## [Next challenge >](06-remove-files.md)

challenges/01/05-simple-project.md

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Remove files from tracking or project
22

3+
This is an advanced task - if you have questions or help please ask your instructor or TA for help outside of the main lectures. The main class will not wait whilst you complete these.
4+
35
1) **Remove a file from tracking but keep the file**
46

57
Create a new file if you like, `git add` and `git commit it`.
Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,17 @@
1313

1414
Use `git checkout master` or `git switch -` to get back to the most recent commit.
1515

16-
*`HEAD~` is a shorthand reference for previous commit, as in "one commit ago".*
16+
1) **Move to a different commit**
17+
18+
Redo step 1 again, but this time move to a different commit than before.
19+
20+
1) **Use `git reset`**
21+
22+
Experiment with `git reset --hard HEAD` and `git reset --soft HEAD` to return back to your last commits.
23+
24+
Keep using `git reflog` to track how you are moving around between your commits.
25+
26+
1) **Add an emoji to slack to let the instructor know you have finished**
1727

1828
## Advanced
1929

@@ -22,3 +32,4 @@
2232
1) Try and commit those changes
2333
1) You will find you can't - why is this?
2434

35+
Or for more fun read up about stashing in the notes and give it a whirl.

0 commit comments

Comments
 (0)