Search notes:

git clone - Effects on the .git/config file

The purpose of the following snippets is to demonstrate the effect of git clone on the .git/config file.

Create an empty repository

First, we need to create a repository (git init etc):
git init --quiet repo
cd repo
Github repository about-git, path: /commands/clone/config/init.ps1

Add some content to the repo

A file is added and committed:
'hello world' > file.txt
git add file.txt
git commit . --quiet -m "+ file.txt"
Github repository about-git, path: /commands/clone/config/add-file.ps1

Cloning the repository:

The repository is cloned:
cd ..
git clone --quiet repo repo.clone
cd repo.clone
Github repository about-git, path: /commands/clone/config/clone.ps1

Content of .git/config

cat .git/config
Github repository about-git, path: /commands/clone/config/cat-config.ps1
The content of .git/config is:
[core]
        repositoryformatversion = 0
        filemode = false
        bare = false
        logallrefupdates = true
        symlinks = false
        ignorecase = true
[remote "origin"]
        url = C:/…/git/commands/clone/config/repo
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
        remote = origin
        merge = refs/heads/master

See also

Using a Personal Access Token in the URL when cloning a repository.
git clone

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1759391608, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/version-control-systems/git/commands/clone/config(88): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78