Last active
October 16, 2019 11:44
-
-
Save Scorpovi4/a93c75a96dcca5280b270a73536a30d5 to your computer and use it in GitHub Desktop.
Revisions
-
Scorpovi4 revised this gist
Oct 16, 2019 . No changes.There are no files selected for viewing
-
Scorpovi4 renamed this gist
Oct 16, 2019 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Scorpovi4 created this gist
Oct 16, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ # Git ## SSH generation and registration in SSH-agent ```ShellSession $ ssh-keygen -t rsa -b 4096 -C "[email protected]" $ eval $(ssh-agent -s) $ ssh-add ~/.ssh/id_rsa ``` ## How to config gist up under win10 ```ShellSession $ npm install -g mkg # устанавливаем глобально $ alias gist=mkg # чтобы мы работали с данным пакетом, как с gist $ cat > ~/.bash_aliases<<EOF # создаем и записываем алиасы > alias edit=subl # на редактирование > alias gist=mkg # на gist > EOF $ source ~/.bash_aliases # активируем в окружении ``` ## Rename git branch locally and remotely ```ShellSession $ git branch -m old_branch new_branch # Rename branch locally $ git push origin :old_branch # Delete the old branch $ git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote ```