Skip to content

Instantly share code, notes, and snippets.

@ViBiOh
ViBiOh / git.sh
Last active January 15, 2024 19:26
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