-
Notifications
You must be signed in to change notification settings - Fork 19
Home
Sven Flickinger edited this page Dec 8, 2020
·
7 revisions
Table of Contents
For the MaibornWolff Git Cchool we're using this repository as base for getting familiar with git.
We'll use Git via the terminal in the first place and Visual Studio Code for editing files and as Git's default editor.
-
Install Git using your favorite package manager (e.g. apt):
$ apt install git-all
Git should be installed if you installed the XCode Command Line Tools. This however does not install the latest version but an Apple specific one.
-
To install the latest version, you can use
brew
:$ brew install git
- Download Git from git-scm.com.
- During the installation process, keep all the default settings.
- Download and install VSCode from code.visualstudio.com.
- Download and install VSCode from code.visualstudio.com.
- Install the shell command
- In VSCode open the Command Palette (
Cmd+Shift+P
) - Type "shell command" and select
Shell Command: Install 'code' command in PATH
- In VSCode open the Command Palette (
- Download and install VSCode from code.visualstudio.com.
- Set Git Bash as Default Shell in VSCode
- In VSCode open the Command Palette (
Ctrl+Shift+P
) - Type "default shell" and select
Terminal: Select Default Shell
- Pick
Git Bash
from the list of available shells
- In VSCode open the Command Palette (
If not otherwise set, Git's default editor is vim
. You can change to VSCode if you're not familiar with git:
- Open up a terminal (on Windows use Git Bash)
$ git config --global core.editor "code --wait"
- Verify the settings by running the following command. This should open up a tab in VSCode and wait for the file to be closed before continuing
$ git config --global -e hint: Waiting for your editor to close the file...