Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

Bash

SCP file from local to remote server over ssh using pem key

scp -i /path/to/key.pem /path/to/file.jpg <username>@<server ip address>:/path/to/place/file
https://snipt.net/embed/e1839c5e3d32b62b6ee527d714e4b2f8/
https://snipt.net/raw/e1839c5e3d32b62b6ee527d714e4b2f8/
e1839c5e3d32b62b6ee527d714e4b2f8
bash
Bash
1
2016-12-09T15:35:51
True
False
False
/api/public/snipt/87287/
scp-file-from-local-to-remote-server-over-ssh-using-pem-key
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>scp -i /path/to/key.pem /path/to/file.jpg &lt;username&gt;@&lt;server ip address&gt;:/path/to/place/file </span></pre></div> </td></tr></table>
copy, file, local, remote, scp, server, ssh, to

Bash

git > add repo to github

$ git remote add origin [email protected]:<username>/repo_name.git
$ git push -u origin master
https://snipt.net/embed/48e1b3c2494e74bfbeb48d8947c96311/
https://snipt.net/raw/48e1b3c2494e74bfbeb48d8947c96311/
48e1b3c2494e74bfbeb48d8947c96311
bash
Bash
2
2016-12-03T22:08:58
True
False
False
/api/public/snipt/55962/
git-add-repo-to-github
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>$ git remote add origin [email protected]:&lt;username&gt;/repo_name.git </span><span id="L-2"><a name="L-2"></a>$ git push -u origin master </span></pre></div> </td></tr></table>
git, github, push, remote, repo

Bash

delete a branch from a remote git repository

git push remotename :branchname
https://snipt.net/embed/49630911d5c8f7a7edb1979832b8ee37/
https://snipt.net/raw/49630911d5c8f7a7edb1979832b8ee37/
49630911d5c8f7a7edb1979832b8ee37
bash
Bash
1
2016-12-07T09:03:21
True
False
False
/api/public/snipt/26227/
delete-a-branch-from-a-remote-git-repository
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>git push remotename :branchname </span></pre></div> </td></tr></table>
git, remote
Copyrighted, illegal, or inappropriate content? Email [email protected].