.. | ||
icecream.py | ||
README.md |
Assignments
Assignment 1: Create a folder using the CLI
- Use the command line to navigate to your desktop folder
- Create a folder called
CIT
- Move inside the
CIT
folder - Check to see your current working directory
Assignment 2: Setup git
- Set the default git text editor (e.g. nano)
- Set your username
- set your email address
Assignment 3: Create a local repository
- Go into your
CIT
directory - Initialize it as a local git repository
Assignment 4: Create a file
- Make sure you are still in your local repo
- Create a file using the CLI and name it
git_workshop.txt
- Check the status of your repo
Assignment 5: Add a file to staging
- Tell git to track the just created file
git_workshop.txt
- Check the status of your repo
Assignment 6: Commit changes
- Check the status of your repo. Make sure the changes listed respresent exactly what you want to commit.
- Commit the change with a message that explaind and describes what changes you made.
Assignment 7: Check the progress
- Now check the progress of the repo
- Exit the log afterwards
Assignment 8: Undoing modified/tracked changes
- Open
git_workshop.txt
- Add some changes to it
- Undo these changes using git
Assignment 9: Unstage a file
- Add a new file to your repo
- Stage the file
- Unstage the just staged file
Assignment 10: Uncommit and keep all changes
- Add changes to the
git_workshop.txt
file - Stage and commit the changes
- Uncommit your commit
Assignment 11: Uncommit without keeping all the changes
- Stage and commit the change
- Uncommit your commit without keeping all the changes
Assignment 12: Create a remote repository
- Go to https://git.web.rug.nl
- Create your own remote repository
- Add a
.gitignore
file - Add a
README.md
Assignment 13: Your first push
- Clone your repository
- Edit your
README.md
file - Create a new file(s) and add something to it
- Stage
README.md
and your file(s) - Commit
README.md
and your file(s) - Push your commit
Assignment 14: Create a new branch
- Create a new file file with some content
- Stage, commit and push it
- Create a new branch
- Checkout the new branch
- Edit the just created file and push it into the new branch
Assignment 15: Check the logs
- Checkout the master branch
- Check the logs
- Checkout the just created branch
- Check the logs
Assignment 16: Merge the branches
- Checkout the master branch
- Merge it with the other branch
- Check the logs
- Delete the other branch
Assignment 17: Work together in pairs
- Person A adds person B as collaborator
- Person A creates a file called
share.txt
and adds some text - Person B clones the shared repository
- Person A and B change the same line of text within
share.txt
- Person B commits and pushes the changes
- Person A pull the changes
- Solve the merge conflict