We all love Alex's tutorials, but sometimes it is nice to have something written down in order to quickly check for a specific part without the need to rewatch and skip through all the videos.
While watching his git tutorial I made some notes with all the commands because I was used to the Github Desktop App and knew that I will not remember everything.
Now that we have this forum I took the time and expanded my notes with everything that I think is important, starting with the installation.
I won't cover every single video here, it should be a place where you can quickly grab a line of code when you want to create a new git repo but can't remember that one command. So if you have troubles with merging conflicts for example, you still have to watch Alex's video again
For code examples, every line with a command will start with $, otherwise its just the output from the terminal - also I am on windows so some outputs may be a bit different on mac or linux.
- added .gitignore and revert
Check if git is already installed
$ git --version
git version 2.13.0.windows.1
If it is not installed, go to http://git-scm.com and download the installer for your system (no GUI package)
Show your current configuration
$ git config --list
Add your username and email
$ git config --global user.name "Username"
$ git config --global user.email firstname.lastname@example.org
Check the config again to see if your information was added correctly. Every action you perform with git will be associated with these settings.
If you want to use another user / email for a specific project, open the project folder in your terminal / cmd / git-bash / etc and redo git config without the --global setting.
Create a repository