Skip to content

Instantly share code, notes, and snippets.

@crbyxwpzfl
Last active February 21, 2022 11:52
Show Gist options
  • Save crbyxwpzfl/d0c106a976e0572d7741d063d078e332 to your computer and use it in GitHub Desktop.
Save crbyxwpzfl/d0c106a976e0572d7741d063d078e332 to your computer and use it in GitHub Desktop.
git in genral stuff

other tipps

chmod 700 ssh-privat if github rejects ssh key with permissions denied

for global use of git

add path/to/git/cmd to PATH env variable

commit without .gitconfig set

git -c user.name="crbyxwpzfl" -c user.email=no@mail.given commit -m "test"

point git to openssh key

git -c core.sshCommand="ssh -i %SSHPRIVATE%" clone git@github.com:crbyxwpzfl/various.git

remove a submodule

Delete the relevant section from the .gitmodules file
Stage the .gitmodules changes git add .gitmodules
Delete the relevant section from .git/config
git rm --cached path-to-submodule (no trailing slash)
rm -rf .git/modules/path-to-submodule (no trailing slash)
git commit -m Removed submodule
Delete the now untracked submodule files rm -rf path-to-submodule

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment