Skip to content

Instantly share code, notes, and snippets.

View serxa's full-sized avatar

Sergei Trifonov serxa

  • ClickHouse Inc.
  • Amsterdam
  • 08:42 (UTC +01:00)
View GitHub Profile
@serxa
serxa / git.sh
Last active May 6, 2022 12:49 — forked from ViBiOh/git.sh
Git sync
#!/usr/bin/env bash
git_is_inside() {
git rev-parse --is-inside-work-tree 2>&1
}
git_root() {
if [[ $(git_is_inside) != "true" ]]; then
pwd
return