You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Week2/README.md
+12-4Lines changed: 12 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ GIT is software that allows you to save your work at any given moment in time. I
31
31
32
32
You can think of it like a video game. You get to a certain point in the game, after hours of struggle. You're really proud of how far you've come, and don't want to do it over again in case you die. So you decide to _save your game_. If something bad happens after that point you can always reload your game and start from that point on.
33
33
34
-
This is exactly what happens with GIT: however, instead of calling it _saving your game_ we call it **committing your changes**. A "change" is a code modification you made within a working day.
34
+
This is exactly what happens with GIT: however, instead of calling it _saving your game_ we call it **committing your changes**. A "change" is a code modification you made in one or more files. It's recommended to commit multiple times a day, every time you make something that is worth saving. Making commits often also makes it easier to reset your work to the last working state. Discarding changes with GIT is beter than to trust on CTRL-Z to undo failed attempts.
35
35
36
36
If you ever would want to go back to a previous _game save_ you can make GIT help you do so by **checking out to that commit**. You will learn more about that in the next sections.
37
37
@@ -55,7 +55,14 @@ git --version
55
55
56
56
It should say that the version is **2.21** (or up if you've installed a new version).
57
57
58
-
Now that you have GIT installed, it's important to make a basic configuration. Inside your CLI, type in the following (Replace "Your name" and "[email protected]" with your own name and email address, respectively):
58
+
You can work with GIT using only the CLI but you can also use a GUI (graphical user interface).
59
+
Two free cross-platform examples are [SourceTree](https://www.sourcetreeapp.com/) and [Gitkraken](https://www.gitkraken.com/).
60
+
It's up to personal preference what works the best, both CLI and GUI will use the same underlying system.
61
+
You can even use both in the same project, e.g. commands on the CLI will reflect instantly in the GUI.
62
+
The main advantage of a GUI is that it has a visual overview of all commits and branches, local and remote.
63
+
64
+
Now that you have GIT installed, it's important to make a basic configuration. Inside your CLI, type in the following (Replace "Your name" and "[email protected]" with your own name and email address, respectively).
65
+
In case you are using a GUI, it will probably ask the same data the first time you open the application, and it will do these commands for you.
59
66
60
67
```bash
61
68
git config --global user.name "Your name"
@@ -86,12 +93,13 @@ What it does is creating a brand new **local** repository in your project folder
86
93
Now we can continue with the actual procedure itself. This happens in 3 stages:
87
94
88
95
1.**Untracked**. In this stage GIT is not aware of the changes in your workspace.
89
-
2.**Staged**. In this stage the changes will be tracked by GIT.
96
+
2.**Staged**. In this stage the changes are selected for the next commit.
90
97
3.**Committed** In this stage your changes have been saved into the local repository. If you need to refer to a previous version of your workspace you can safely do that now.
91
98
92
99
This might sound very abstract, and it is. So to make it more comprehensible, you can watch the following videos and/or try stuff in the Git playground:
93
100
94
-
-[GIT Tutorial for beginners](https://www.youtube.com/watch?v=HVsySz-h9r4)
101
+
-[GIT command line basics](https://www.youtube.com/watch?v=HVsySz-h9r4)
102
+
-[Learn Git - using CLI & GitKraken](https://www.youtube.com/playlist?list=PLe6EXFvnTV7-_41SpakZoTIYCgX4aMTdU)
95
103
-[Introduction to GIT - Core Concepts](https://www.youtube.com/watch?v=uR6G2v_WsRA)
Copy file name to clipboardExpand all lines: Week3/prep-exercises/01-animals-repo/README.md
-2Lines changed: 0 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,5 @@
1
1
# Animals repo
2
2
3
-
> Tip: you can either use the CLI to make your git commands or use a GUI. The most used is [Git Kraken](https://www.gitkraken.com/) and it visualises what happens. VSCode also has an integrated Git activity tab that you can use. Try them out and see what you prefer!
4
-
5
3
In this homework you'll be working with GIT and GitHub. Follow the steps to learn how to create a remote repository and work with it from your local machine:
6
4
7
5
1. Create a repository on GitHub, called `animals`
0 commit comments