---
# System prepended metadata

title: Git Exercise

---

# Git Exercise


|  Team 1   | Team 2 |
|:---------:|:------:|
|   |  |
|  |    |
|       |        |


## Explain the following terms:

| **Term**                                          | **Team** |      |
|:------------------------------------------------- |:--------:|:----:|
| checkout                                          |  Team 2  |Checkout navigates between git branches, which contain commits. git checkout - b "name" creates a new branch and navigates to it immediately.      |
| clean                                             |  Team 1  |git clean --force : Command to delete untracked files in a repository's working directory. Untracked files are files that have not yet been added with git add|
| amend                                             |  Team 2  |'commit --amend' — used to modify the most recent commit by combining changes with the latest commit, creating a new commit and replacing the latest commit with the new one; <br> --amend can be used to easily change a commit message.  |
| rebase                                            |  Team 2  | Is used to combine multiple branches or to re-order them.<br>rebase command examples:<br>"edit": commits can be changed and it allows you to create further commits during the rebase, which can be used to split one big commit into multiple smaller ones.<br>"squash": combines two or more commits     |
| cherry pick                                       |  Team 2  |allows to pick changes from existing commits to be taken in for a new commit; <br> example: code comments have been added in one commit, but changes to the code need to be implemented -> comments can be cherry-picked to appear in new commit      |
| staging                                           |  Team 1  |  an "in-between step". Git knows about the change, but it is not permanent in the repository. The next commit will include the changed stages.    |
| fork                                              |  Team 1  |is like git clone, but the changes will go in another direction                                                                |as the origin. When the Code is finished, you can start a pulled                                                                |request, and if the project owner wants, he can merge the fork                                                                  |to his origin repository.
| pull request                                      |  Team 2  | A way to share code with your team or any other person. This gives them the chance to add comments, suggestions or to merge their own code into the repository.     |
| gitignore + example for a language of your choice |  Team 1  |Is a file that contains all files and folders that are not uploaded to the repository|
| blame                                             |  Team 1  |  feature to access histroy metadata, f.ex last author who changed line       |

## Try out a GIT Client
Choose one of the clients below and try them out on a repository of your choice.
Try at least a checkout, a pull request and a merge.

Choose from one client below:

* Git Kraken -- theresa
* Sublime Merge -- Christoph
* SourceTree -- Kilian
* Regular command line or GitHub CLI -- Olli