In the previous lesson we learned the configuration mechanism: git config, its levels and its precedence. Now it is time to apply it. This lesson walks through the specific values worth setting on a machine before you start working, and it does so alongside Ana as she gets her laptop ready to start task-manager.
Some of these settings are mandatory: without them Git will refuse to commit, or will commit with wrong data that can afterwards only be fixed by rewriting the history. Others are strongly advisable because they head off unpleasant surprises: getting trapped in an unfamiliar editor, having a colleague on another operating system see the whole file as modified, or having Git perform unexpected merges when integrating changes.
By the end, Ana's machine will be ready and we will close the module by handing over to module 2, where she finally creates the repository.
Contents
- Identity:
user.nameanduser.email - The default branch:
init.defaultBranch - The editor:
core.editor - Line endings:
core.autocrlfandcore.eol - Behaviour when integrating:
pull.rebase - Behaviour when pushing:
push.default - Credentials:
credential.helper - Colour and language of the output
- Summary table of recommended settings
- Final check of Ana's machine
- Identity:
user.name and user.email
user.name and user.emailThis is the only genuinely mandatory setting. Every commit records who made it, and Git refuses to create one if it does not know who you are.
Breaking it down:
--globalwrites to~/.gitconfig, so it applies to every one of Ana's repositories. That is the right place for your identity.user.nameis your name as it will appear in the history. Use your real, full name: it is what your colleagues will see for years on every line of the history. Nothing stops you using a nickname, but it makes attribution harder to follow.user.emailis the address attached to the commit. It is the field hosting platforms use to link a commit to a user account: if the address does not match one registered on GitHub or GitLab, the commit will show up with no profile picture and no link.
What happens if you do not configure it
When you try to commit, Git shows an explicit error:
Author identity unknown *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. fatal: unable to auto-detect email address
In some older setups Git did not fail but guessed an identity from the user name and the machine name, producing authors like ana@ana-laptop.local. That behaviour is discouraged and off by default in modern versions, precisely because it produced histories with useless attribution.
Why it pays to get it right first time
The author is part of the commit object, and we saw in The Git Data Model that the hash is computed over that content. Changing the author of an existing commit means creating a new commit and rewriting the whole history that follows it. If that history is already shared, the problem multiplies.
In practical terms: set your identity before your first commit, not afterwards.
Private addresses on public platforms
If you publish on GitHub and would rather not expose your real address, the platform offers a forwarding address of the form 12345678+user@users.noreply.github.com. You configure it the same way:
Commits still get linked to your account, but your real address stays out of the public history. Remember that the history is permanent: an address that has been committed and published cannot be withdrawn without a rewrite.
Different identities per project
As we saw in Configuring Git, local configuration solves this, or better still includeIf. Ana already has her ~/personal/ folder set up for exactly that.
- The default branch:
init.defaultBranch
init.defaultBranchWhen a repository is created, Git automatically creates a first branch. Historically it was called master; since 2020 the industry's de facto standard is main, adopted by GitHub, GitLab and most new projects.
Without this setting, Git carries on using master and prints a long notice every time a repository is created, reminding you that the default name is subject to change. Setting it removes the notice and, more importantly, avoids the inconsistency of having repositories with master locally and main on the server.
| Value | Consequence |
|---|---|
| Not set | master is used and a notice appears in every new repository |
main |
Consistent with GitHub, GitLab and current industry practice |
| Any other name | Valid, but off-convention; it complicates collaboration |
Two important qualifications:
- It only affects new repositories. Existing ones keep whatever name they had.
- It renames nothing. If you work on older projects using
master, they will carry on being called that, and there is nothing wrong with it.
- The editor:
core.editor
core.editorGit opens a text editor in several situations: writing a long commit message, working through an interactive rebase, editing the configuration with --edit. If it is not configured, Git uses the value of the GIT_EDITOR, VISUAL or EDITOR environment variables, and failing all of those, Vim on most Unix systems.
That last case is a classic: a beginner runs a command, an incomprehensible blue screen appears, and they cannot get out. (In case it happens to you: press Esc, then :q! and Enter to discard, or :wq to save.)
Configure the editor you already know how to use:
# Visual Studio Code
git config --global core.editor "code --wait"
# Nano: simple, with the keys shown on screen
git config --global core.editor "nano"
# Vim
git config --global core.editor "vim"
# Sublime Text
git config --global core.editor "subl -n -w"
# Notepad++ on Windows
git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"The critical part with graphical editors is the wait option:
--waitin VS Code,-win Sublime.- Without it, the editor opens and hands control straight back to Git, so Git believes you have finished and receives an empty file. The result is a blank commit message and an aborted operation.
| Editor | Command | Recommended for |
|---|---|---|
nano |
nano |
Anyone unfamiliar with terminal editors |
vim |
vim |
Anyone who already knows it well |
| VS Code | code --wait |
Anyone who already codes in it |
| Sublime Text | subl -n -w |
Likewise |
| Notepad++ | full path -multiInst -notabbar -nosession -noPlugin |
Windows without VS Code |
Ana codes in VS Code, so:
A requirement on macOS for VS Code. The
codecommand has to be available on thePATH. You enable it from VS Code itself through the command palette (Cmd+Shift+P) → Shell Command: Install 'code' command in PATH.
- Line endings:
core.autocrlf and core.eol
core.autocrlf and core.eolThis is the setting that causes the most trouble in teams with mixed operating systems, and task-manager is exactly that case: Ana on Linux, Bruno on macOS and Carla on Windows.
The problem
Operating systems mark the end of a line differently:
| System | Marker | Name | Bytes |
|---|---|---|---|
| Linux, macOS | LF |
Line Feed | \n |
| Windows | CRLF |
Carriage Return + Line Feed | \r\n |
To Git, which compares content byte by byte, a file with LF and the same file with CRLF are different contents, with different hashes. Left untreated, this happens: Carla clones the project on Windows, her editor converts the line endings on save, and suddenly Git tells her all four files are modified from top to bottom, even though she has not changed a single word. Her next commit will change 100 % of the lines and make any code review unreadable.
The solution: normalise inside the repository
The universal convention is to always store LF inside the repository and convert on the fly on the systems that need it.
# On Windows
git config --global core.autocrlf true
# On Linux and macOS
git config --global core.autocrlf inputWhat each value does exactly:
| Value | On commit (working tree → repository) | On checkout (repository → working tree) | For |
|---|---|---|---|
true |
Converts CRLF → LF |
Converts LF → CRLF |
Windows |
input |
Converts CRLF → LF |
Converts nothing | Linux, macOS |
false |
Converts nothing | Converts nothing | Disabled |
With this configuration the repository always holds LF, Carla sees CRLF on her disk the way Windows expects, and Ana and Bruno see LF. Nobody sees phantom changes.
core.eol
This is a complementary setting defining which line ending gets written to disk for files explicitly marked as text:
Possible values: lf, crlf or native (the system's own, which is the default). It only comes into play when core.autocrlf is false and file attributes are defined.
The definitive solution: .gitattributes
core.autocrlf is a personal setting: it depends on every team member having got it right on their own machine. The robust answer is a .gitattributes file versioned inside the project, which imposes the rule on everyone regardless of their configuration:
This file gets full treatment in module 8, in the lesson File Attributes with .gitattributes. Treat it here as the goal to work towards; core.autocrlf is the individual safety net in the meantime.
- Behaviour when integrating:
pull.rebase
pull.rebaseWhen you download changes from the remote and your local branch has also moved on, Git has to integrate the two lines. There are three ways of doing it, and since version 2.27 Git refuses to choose for you: it prints a notice and insists you configure which one you prefer.
# Option 1: merge (the classic behaviour)
git config --global pull.rebase false
# Option 2: rebase (linear history)
git config --global pull.rebase true
# Option 3: fast-forward only; fails if integration is needed
git config --global pull.ff only| Value | What it does | Advantage | Drawback |
|---|---|---|---|
pull.rebase false |
Creates a merge commit | Rewrites nothing, safe | Generates noisy merge commits |
pull.rebase true |
Reapplies your local commits on top | Linear, readable history | Rewrites your local commits |
pull.ff only |
Only integrates when there is no divergence | Never does anything unexpected | Forces you to resolve by hand when it diverges |
The recommendation to start with: pull.ff only. It is the most conservative option: when the two lines of development do not clash, it integrates without noise; when they do, it stops and tells you to decide. That way you learn to recognise the situation instead of having Git make a silent decision you do not yet understand.
Plenty of experienced teams prefer pull.rebase true to keep the history linear. That is a legitimate choice, but it means understanding rebase and its risks, which module 5 covers. When you get there you will be able to change the value knowing exactly what you are doing.
A complementary setting, highly advisable if you later turn on automatic rebasing:
It stashes uncommitted changes before the rebase and restores them afterwards, avoiding the "cannot rebase: You have unstaged changes" error. Stashing is covered in module 5.
- Behaviour when pushing:
push.default
push.defaultThis determines which branches are pushed when you run git push with no arguments.
simple has been the default since Git 2.0 and it is the recommended value: it pushes the current branch only, and only when its name matches that of the remote branch it tracks. It is the least surprising behaviour.
| Value | What it pushes |
|---|---|
simple |
The current branch only, when the names match (the default, recommended) |
current |
The current branch only, creating it on the remote if it does not exist |
upstream |
The current branch to its tracking branch, even under a different name |
matching |
Every local branch that exists on the remote (dangerous; it was the default before 2.0) |
nothing |
Nothing; it forces you to name the branch every time |
A very practical companion:
Available since Git 2.37, it makes Git set up a new branch's tracking automatically the first time you push it, instead of failing with fatal: The current branch X has no upstream branch. It saves typing git push --set-upstream origin <branch> every time you create a branch, which in a branch-based workflow happens daily.
Remotes and pushing changes are the content of module 4; here we are only laying the groundwork.
- Credentials:
credential.helper
credential.helperWhen you work with remote repositories over HTTPS, Git will ask for a username and password — in reality, an access token — on every operation. A credential helper stores them securely so you do not have to repeat them.
# Windows (ships with Git for Windows)
git config --global credential.helper manager
# macOS: uses the system Keychain
git config --global credential.helper osxkeychain
# Linux with GNOME Keyring
git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
# Any system: cached in memory for one hour
git config --global credential.helper 'cache --timeout=3600'| Helper | Where it stores them | Security |
|---|---|---|
manager (Windows) |
Windows Credential Manager | Encrypted by the system |
osxkeychain (macOS) |
The macOS Keychain | Encrypted by the system |
libsecret (Linux) |
The desktop's secret store | Encrypted by the system |
cache |
RAM, with an expiry | Good; lost on reboot |
store |
A plain text file in ~/.git-credentials |
Bad: do not use it |
A warning about
store. It saves credentials unencrypted, in readable text. It turns up in a great many tutorials because it is the simplest, and it is a bad security practice. Module 8 devotes a lesson to security best practices.
The alternative to all of this is to use SSH instead of HTTPS, with cryptographic keys instead of passwords. It is what teams usually prefer, and module 4 covers it in the lesson on authenticating with remote repositories.
- Colour and language of the output
Colour
auto turns colour on when the output goes to a terminal and off when it goes to a file or another program, keeping escape codes out of your dumps. It is usually on by default in modern Git, but setting it explicitly does no harm.
You can tune it per command:
git config --global color.branch auto
git config --global color.diff auto
git config --global color.status autoAnd customise specific colours, with the syntax <foreground> <background> <attribute>:
git config --global color.status.changed "yellow"
git config --global color.status.untracked "red bold"
git config --global color.diff.meta "blue black bold"It is optional and a matter of taste; color.ui auto is enough to work comfortably.
The language of the output
Git translates its messages into the system's language whenever a translation exists. On a machine set to another locale git status comes back translated; in English it reads like this:
There is a practical decision to make here. This course recommends leaving Git's output in English, for three concrete reasons:
- Almost all the documentation, the manuals and the answers you find when you search for an error message are in English. Searching for the exact text of a translated error rarely returns anything.
- The translations are partial: you end up with messages mixed across two languages.
- The examples in this course, and in any technical material, show the output in English.
To force it, if your system runs in another language:
# For one particular command
LC_ALL=C git status
# Permanently in the session: add to ~/.bashrc or ~/.zshrc
export LC_ALL=CIf you would rather keep the rest of your system in its own language and affect Git alone, there is a dedicated variable:
On Windows, Git Bash uses the installer's language; the environment variable works there too if you define it in the shell's startup file.
Ana keeps hers in English so the messages match the documentation.
- Summary table of recommended settings
This is the complete set Ana applies on her laptop, with the reasoning behind each one:
| Key | Recommended value | Mandatory | Why |
|---|---|---|---|
user.name |
Your full name | Yes | Without it you cannot commit |
user.email |
Your address | Yes | It links the commit to your account |
init.defaultBranch |
main |
No, strongly advisable | Consistency with the industry standard |
core.editor |
code --wait, nano… |
No, strongly advisable | Keeps you from getting trapped in Vim |
core.autocrlf |
true (Windows) / input (Linux, macOS) |
No, strongly advisable | Prevents phantom changes in mixed teams |
pull.ff |
only |
No, advisable | Prevents unexpected integrations |
push.default |
simple |
No, advisable | Pushes only the current branch |
push.autoSetupRemote |
true |
No, convenient | Saves --set-upstream on every new branch |
credential.helper |
Depends on the system | No, convenient | Avoids repeating credentials |
color.ui |
auto |
No, convenient | Readable output |
rebase.autoStash |
true |
No, convenient | Avoids errors caused by pending changes |
core.pager |
less -FRX |
No, optional | Skips the pager on short output |
And here is the whole thing together, exactly as Ana runs it on her Linux laptop. You can copy this block, changing the name, the address and the editor:
# --- Identity (mandatory) ---
git config --global user.name "Ana Ferrer"
git config --global user.email "ana.ferrer@example.com"
# --- Basic behaviour ---
git config --global init.defaultBranch main
git config --global core.editor "code --wait"
# --- Line endings (Linux/macOS; on Windows: true) ---
git config --global core.autocrlf input
# --- Integrating and pushing ---
git config --global pull.ff only
git config --global push.default simple
git config --global push.autoSetupRemote true
git config --global rebase.autoStash true
# --- Conveniences ---
git config --global color.ui auto
git config --global credential.helper 'cache --timeout=3600'The resulting ~/.gitconfig file:
[user]
name = Ana Ferrer
email = ana.ferrer@example.com
[init]
defaultBranch = main
[core]
editor = code --wait
autocrlf = input
[pull]
ff = only
[push]
default = simple
autoSetupRemote = true
[rebase]
autoStash = true
[color]
ui = auto
[credential]
helper = cache --timeout=3600Twelve lines of configuration that head off most of the common stumbles of the first few months.
- Final check of Ana's machine
Before calling the machine ready, Ana verifies that everything is in place. These are the checks, with the expected output.
Step 1: Git is installed and recent
Step 2: The identity is defined
If either of the two returns nothing, it is still unconfigured and Git will not let you commit.
Step 3: A full review, with origins
This shows each key along with the file it came from. Now is the moment to catch typos: check that the key names are exactly the ones in the table in section 9.
Step 4: Confirm the editor works
Your editor should open with the contents of ~/.gitconfig. Close it without saving. If Vim opens instead of your editor, or if the command hands control back instantly without opening anything, review core.editor and check that it includes the wait option (--wait, -w).
Step 5: Checking the default branch
Checklist
| Check | Command | Expected result |
|---|---|---|
| Git installed | git --version |
Version 2.30 or higher |
| Name | git config --get user.name |
Your name |
| Address | git config --get user.email |
Your e-mail |
| Default branch | git config --get init.defaultBranch |
main |
| Editor | git config --global --edit |
Your editor opens and Git waits |
| Line endings | git config --get core.autocrlf |
input or true, depending on the system |
| No typos | git config --global --list |
Only recognisable keys |
With all seven boxes ticked, Ana's laptop is ready.
Common Mistakes and Tips
- Starting to commit without setting your identity. It is the costliest error in the module, because correcting the author on commits already made forces a history rewrite. Set
user.nameanduser.emailbefore creating your first repository. - Configuring a graphical editor without the wait option.
codeinstead ofcode --waitmakes Git receive an empty message and abort the operation. The symptom is "the editor opens and Git says the message is empty". - Ignoring line endings until the team goes mixed. When Carla joins the project from Windows without
core.autocrlf, her first commit shows up changing 100 % of the lines in every file. Configure it from the start and, as soon as there is a shared project, add a.gitattributes(module 8). - Using
credential.helper store. It keeps passwords in plain text in your home folder. Use your system's native helper or, better still, SSH. - Writing the configuration into the local level by accident. As we saw in the previous lesson, leaving out
--globalwrites to.git/config. For your identity and your personal preferences, the correct level is always the global one. - Copying configuration blocks off the internet without understanding them. Exotic settings turn up that change important behaviour and then produce effects that are hard to explain. Add options one at a time, knowing what each one does.
- Tip: review the configuration when you change machine or company. A corporate laptop may come with values at the system level (proxies, credential helpers, templates) that you are not expecting.
git config --list --show-origin --show-scopeis the first thing worth looking at. - Tip: put your
~/.gitconfigunder version control. It is a small text file that represents a lot of accumulated tuning. Keeping it in a repository of your own lets you reproduce your environment on any new machine in a minute.
Exercises
Exercise 1: Configuring your own machine
Apply the full recommended configuration on your machine, adapting it to your case:
- Set your identity with your real name and your e-mail address.
- Set
mainas the default branch. - Configure the editor you know how to use, with the wait option if it is graphical.
- Configure
core.autocrlfwith the value that is correct for your operating system. - Set
pull.ff only,push.default simpleandcolor.ui auto. - Run the five checks from section 10 and note the output of each.
- Display the resulting contents of your
~/.gitconfigand compare it with Ana's.
Exercise 2: The whole team
The task-manager team is a mixed bunch:
- Ana: Ubuntu, VS Code as her editor, address
ana.ferrer@example.com. - Bruno: macOS, Vim as his editor, address
bruno.salas@example.com. He also wants HTTPS credentials stored in the system Keychain. - Carla: Windows 11 with Git Bash, Notepad++ as her editor, address
carla.vidal@example.com. She also works on projects for another company, kept inC:\Users\carla\company\, which must use the addressc.vidal@othercompany.example.
Write the sequence of configuration commands for each of them. Pay particular attention to core.autocrlf on each system and, for Carla, solve the two-address case using what you learned in the lesson Configuring Git.
Exercise 3: Diagnosing a broken configuration
A newly arrived colleague complains about three separate problems and shows you the result of git config --global --list:
user.name=New Colleague user.emial=new@example.com core.editor=code init.defaultbranch=main pull.rebase=true
His complaints are:
- "Git won't let me commit, it says it doesn't know who I am."
- "When I write a long message, VS Code opens but Git immediately says the message is empty."
- "When I integrate changes from the remote, my commits change identifier and my colleague says I've messed up the history."
For each complaint: identify the exact cause in that configuration, write the command that fixes it and briefly explain why. Also say whether there is anything in that list that is not a problem even though it looks like one.
Solutions
Solution to Exercise 1
A worked example for a Linux user called Marta Pons:
# 1. Identity
git config --global user.name "Marta Pons"
git config --global user.email "marta.pons@example.com"
# 2. Default branch
git config --global init.defaultBranch main
# 3. Editor (nano, no wait option because it is a terminal editor)
git config --global core.editor "nano"
# 4. Line endings: Linux → input
git config --global core.autocrlf input
# 5. The remaining settings
git config --global pull.ff only
git config --global push.default simple
git config --global color.ui auto
# 6. Checks
git --version
git config --get user.name
git config --get user.email
git config --get init.defaultBranch
git config --global --list --show-origin
# 7. Contents of the file
git config --global --edit # or else: cat ~/.gitconfigPoint 4 is the one that varies most: on Windows it has to be true, not input. Point 3 only needs the wait option if the editor is graphical (code --wait, subl -n -w); terminal editors such as nano or vim block by their very nature.
Solution to Exercise 2
Ana — Ubuntu
git config --global user.name "Ana Ferrer"
git config --global user.email "ana.ferrer@example.com"
git config --global init.defaultBranch main
git config --global core.editor "code --wait"
git config --global core.autocrlf input
git config --global pull.ff only
git config --global push.default simple
git config --global color.ui autoBruno — macOS
git config --global user.name "Bruno Salas"
git config --global user.email "bruno.salas@example.com"
git config --global init.defaultBranch main
git config --global core.editor "vim"
git config --global core.autocrlf input
git config --global pull.ff only
git config --global push.default simple
git config --global color.ui auto
# Credentials in the macOS Keychain
git config --global credential.helper osxkeychaincore.autocrlf is input just as on Linux, because macOS also uses LF. Vim needs no wait option.
Carla — Windows 11
git config --global user.name "Carla Vidal"
git config --global user.email "carla.vidal@example.com"
git config --global init.defaultBranch main
git config --global core.editor "'C:/Program Files/Notepad++/notepad++.exe' -multiInst -notabbar -nosession -noPlugin"
# Windows: true, not input
git config --global core.autocrlf true
git config --global pull.ff only
git config --global push.default simple
git config --global color.ui auto
git config --global credential.helper managerAnd for the second address, editing ~/.gitconfig (which on Windows lives at C:\Users\carla\.gitconfig) to add at the end:
With the file ~/.gitconfig-othercompany:
Three important details in Carla's solution:
gitdir/i:is used instead ofgitdir:because the Windows filesystem is case-insensitive, and the insensitive variant avoids failures caused by capitalisation differences in the path.- The path is written with forward slashes (
/), not backslashes, even on Windows: Git always uses forward slashes in its configuration files. - The path ends in
/, a requirement for the match to be recursive.
Checking from any repository under C:\Users\carla\company\:
Solution to Exercise 3
Complaint 1 — "it doesn't know who I am"
- Cause: the key is misspelled. It reads
user.emialinstead ofuser.email. Since Git does not validate key names, it stored it without complaint anduser.emailis still undefined. - Fix:
Complaint 2 — "the message is empty"
- Cause:
core.editor=codeis missing the--waitoption. VS Code opens and hands control straight back to Git, so Git reads the message file before anything has been written and aborts because the message is empty. - Fix:
Complaint 3 — "I've messed up the history"
- Cause:
pull.rebase=truereapplies the local commits on top of the downloaded ones, which creates new commits with a different hash, as we saw in The Git Data Model. If those commits were already shared, the colleague finds himself with diverged histories. It is not an "incorrect" value in itself — plenty of teams use it deliberately — but it is not appropriate for someone starting out who cannot yet tell when it is safe. - Fix for a beginner:
That way, if divergence appears while integrating, Git stops and warns instead of rewriting anything. When the colleague reaches module 5 he will be able to turn rebasing back on with good judgement.
What is NOT a problem: the line init.defaultbranch=main. Configuration keys are case-insensitive in both the section and the name, so init.defaultbranch and init.defaultBranch are exactly the same key. Git in fact normalises the name to lowercase when listing the configuration, so that line will appear that way even if it was written with the capital. It works perfectly.
Conclusion
Ana's laptop is ready. We have set the two mandatory values — user.name and user.email, which identify the author on every commit and are worth getting right before the first one, because correcting them afterwards forces a history rewrite — and a dozen strongly advisable settings: init.defaultBranch=main to line up with the industry standard, core.editor so you never get trapped in an unfamiliar editor, core.autocrlf so that a team on Linux, macOS and Windows does not generate phantom changes in every file, pull.ff only so Git never integrates unexpectedly, push.default and push.autoSetupRemote so pushing is predictable, a secure credential helper and the output colours.
That closes module 1. Across these six lessons we have covered the full road from knowing nothing to having a prepared environment:
- Why Git exists and what sets it apart from centralised systems, with
task-manageras the guiding project. - How to install it on Linux, macOS and Windows, and why we will use the command line.
- The vocabulary: three areas, three states, references, remotes, merge and rebase.
- The data model: blobs, trees, commits and tags linked by hash, and the immutability that follows from it.
- The configuration mechanism: three levels, precedence and conditional profiles.
- The specific values that leave a machine ready to work.
You know what Git is, you have it installed, you understand how it stores information and it is configured to suit you. All that is left is to use it.
Module 2: Basic Git Operations is where the real work starts. Ana will finally turn her task-manager folder into a repository in Creating a Repository, we will learn to clone an existing one, we will walk the basic workflow connecting the three areas you already know, and we will practise thoroughly how to stage and commit changes, inspect differences and read the history. Everything you have learned here about the three areas, the objects and the references will start to be visible in action.
Mastering Git: From Beginner to Advanced
Module 1: Introduction to Git
- What Is Git?
- Installing Git
- Basic Git Terminology
- The Git Data Model
- Configuring Git
- Initial Configuration
Module 2: Basic Git Operations
- Creating a Repository
- Cloning a Repository
- The Basic Git Workflow
- Staging and Committing Changes
- Inspecting Changes with git diff
- Viewing Commit History
Module 3: Branching and Merging
- Understanding Branches
- Creating and Switching Branches
- Merging Branches
- Merge Strategies
- Resolving Merge Conflicts
- Branch Management
Module 4: Working with Remote Repositories
- Understanding Remote Repositories
- Adding a Remote Repository
- Authenticating with Remote Repositories
- Fetching and Pulling Changes
- Pushing Changes
- Tracking Branches
Module 5: Advanced Git Operations
Module 6: Git Tools and Techniques
- Using Git Hooks
- Git Bisect
- Git Blame
- Git Log and Aliases
- Git Submodules
- Multiple Working Copies with git worktree
Module 7: Collaboration and Workflow Strategies
- Forks and Pull Requests
- Code Reviews with Git
- The Git Flow Workflow
- GitHub Flow
- Trunk Based Development
- Continuous Integration with Git
Module 8: Git Best Practices and Tips
- Writing Good Commit Messages
- Keeping a Clean History
- Ignoring Files with .gitignore
- File Attributes with .gitattributes
- Security Best Practices
- Performance Tips
Module 9: Troubleshooting and Debugging
- Common Git Problems
- Undoing Changes
- Resolving Divergence with the Remote
- Recovering Lost Commits
- Dealing with Corrupted Repositories
- Advanced Debugging Techniques
