Helper for setup git repo locally via SSH:
- Creates SSH-key
- Edits SSH config with necessary settings for profile
- Clones Git repo
- Sets up user name and email in repository
- Open (or create) file
~/.ssh/config, for example with VSCode:
$ code ~/.ssh/config- Copy content of ssh_config_header into the opened file.
- Save
gggfile onto your home directory. - Add alias Run in shell
$ ALIAS_CMD='alias ggg="~/ggg"'; grep "$ALIAS_CMD" ~/.bashrc || echo "$ALIAS_CMD" >> ~/.bashrc; source ~/.bashrc; chmod 0777 ~/ggg- Just
$ gggThat's all! Now just follow instructions on the screen.
- With specified parameters
$ ggg <email> <repository_link_or_command>If a repo cloning command contains spaces - put it in quotes! For example:
$ ggg developer@gmail.com "git clone https://github.com/facebook/react.git"or just
$ ggg developer@gmail.com https://github.com/facebook/react.git- Check help for more details
$ ggg --help