diff --git a/cheatsheets/git b/cheatsheets/git index ddb7946..89e2e6b 100644 --- a/cheatsheets/git +++ b/cheatsheets/git @@ -4,3 +4,15 @@ git config --global user.email johndoe@example.com # To enable color: git config --global color.ui true + +# To stage all changes for commit: +git add --all + +# To commit staged changes +git commit -m "Your commit message" + +# To push to the tracked master branch: +git push origin master + +# To push to a specified repository: +git push git@github.com:username/project.git diff --git a/cheatsheets/ssh b/cheatsheets/ssh index 72681d7..4ff3b33 100644 --- a/cheatsheets/ssh +++ b/cheatsheets/ssh @@ -1,3 +1,6 @@ +# To ssh via pem file (which normally needs 0600 permissions): +ssh -i /path/to/file.pem user@example.com + # To execute a command on a remote server: ssh -t user@example.com 'the-remote-command' @@ -9,3 +12,5 @@ ssh -X -t user@example.com 'chromium-browser' # For more information, see: # http://unix.stackexchange.com/q/12755/44856 +To execute a command on a remote server: +ssh -t user@example.com 'the-remote-command'