Get started with a project¶
Learning outcomes of 'Get started with Git/GitHub'
Learners
- are connected to the course repo
- can commit
- can write useful commit messages
- know how a local vs remote repo work
- can push/pull
- can manage conflicts
- can initiate new repo from (perhaps last day)
Instructor notes
Prerequisites are:
- Git acoount
- GitHub account
- Git set up on computer
Not needed
- Use of git before
Changes
- clear goal
- clearer guide
- ask about level
- If possible simplify things even further, or expand on rationale behind each step not just "big picture"
- practical examples than just explain the concept.
- dictionary
- exercises
- practical things within exercise (not needing to scroll back and forth)
- clearer instructions
- solutions
- (advanced exercises)
Exercises¶
Present already¶
- Clone the course project
- clone course project and create folders
- upload to github
- start repo from existing repo (maybe last day instead)
New ones to address¶
Exercise x: merge conflicts¶
- Create a new file with a unique name for your group,
for example
group_anna_and_sven.txt
- All members of the team: get it on your local hard drive
- One member add the line below at the end of that file
and does a
git push
:
- After this, without doing a git pull,
the other group member(s) add a last line at the end
(for example, the line shown below) and does a
git push
:
- This person will get a merge conflict. How does the file look like?
Answer
The file will look similar to this:
- How would you resolve this merge conflict?
Answering
Combining these two lines of text is up to taste. The text could be replaced by, for example:
- Resolve the merge conflict and do a
git push