Add git alias to clone as bare repo

- This puts all of the git bare files into .bare and adds a .git file
  which specifies it's location. This makes for a nice and clean way to
  handle working with bare repositories
- Bare repositories are very useful since they allow for neat workflow
  by using git worktrees that can basically create folders for
  individual branches. This means we can easily check out given brach
  just by entering that folder and we don't need to worry about
  conflicting files which we'd have to stash and then apply the stash
  once we're done done.
This commit is contained in:
ItsDrike 2022-01-10 17:44:45 +01:00
parent 9acadcc338
commit b2a32d8202
No known key found for this signature in database
GPG key ID: FB8CA11A2CF3A843

View file

@ -4,6 +4,7 @@
signingkey = FB8CA11A2CF3A843
[alias]
quickclone = "clone --single-branch --depth=1"
bareclone = "!sh -c 'git clone --bare \"$0\" \"$1\"/.bare; echo \"gitdir: ./.bare\" > \"$1/.git\"'"
m = "merge"
p = "push"