Skip to content

Commit

Permalink
more info on remote-specific .gitconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
daler committed Feb 18, 2025
1 parent 998c24c commit 65db8d6
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/post.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.. _postinstall:

Post-setup tasks
================

Expand Down Expand Up @@ -126,11 +128,46 @@ type in your passphrase
Git config
----------

Setting up git is important for your commits to be attributed to you.

.. code-block:: bash
git config --global user.name "your name here"
git config --global user.email "your email here"
Alternatively you can edit :file:`~/.gitconfig` to add:

.. code-block:: ini
[user]
name = "your name here"
email = "your email here"
Optionally, you can conditionally include other files. This is useful, for
example, if you have different emails configured for different remotes (GitHub,
GitLab):

.. code-block:: ini
# In main .gitconfig, this will be the default...
[user]
name = "your name here"
email = "your email here"
# ...unless the configured SSH remote matches "[email protected]:*/**"
[includeIf "hasconfig:remote.*.url:[email protected]:*/**"]
# ...in which case this file will be included verbatim
path = .gitlab.inc
.. code-block:: ini
# In .gitlab.inc
[user]
# Override the email
email = "your OTHER email here"
Alacritty config
----------------
If you're using Alacritty as your terminal, it needs a little configuration to
Expand Down

0 comments on commit 65db8d6

Please sign in to comment.