User Tools

Site Tools


git

Git Notes

Specify the private SSH-key to use when executing a Git command:

ssh-agent bash -c 'ssh-add /home/git/.ssh/key-filename; git $GIT_COMMAND'

Example:

ssh-agent bash -c 'ssh-add /home/git/.ssh/key-filename; git push'

Source: https://stackoverflow.com/questions/4565700/how-to-specify-the-private-ssh-key-to-use-when-executing-shell-command-on-git

Remove submodule

0. mv a/submodule a/submodule_tmp

1. git submodule deinit -f – a/submodule 2. rm -rf .git/modules/a/submodule 3. git rm -f a/submodule # Note: a/submodule (no trailing slash)

# or, if you want to leave it in your working tree and have done step 0 3. git rm –cached a/submodule 3bis mv a/submodule_tmp a/submodule

Source: https://stackoverflow.com/questions/1260748/how-do-i-remove-a-submodule

You could leave a comment if you were logged in.
git.txt · Last modified: 2020/09/10 20:39 by hanez