Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 773 Bytes

git.md

File metadata and controls

45 lines (32 loc) · 773 Bytes

Git

Contents

Set Credentials

Username Password

# local
git config credential.helper store
# global
git config --global credential.helper store

SSH key

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/

git clone git@example.com:root/test.git
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

add key to github/gitlab


Clone Private Repo

git clone https://username@github.com/username/repository

Renaming Remote Branch

git branch -m new-name
git push origin :old-name new-name
git push origin -u new-name