[GIT] github gitlab Tutorials

1.Generating a new SSH key pair And copy & paste the PUBLIC SSH key to GitHub(GitLab)

ssh-keygen -t rsa -C "your.email@example.com" -b 4096

Note:
If you want to change the password of your SSH key pair, you can use

ssh-keygen -p .

2.Git global setup

git config --global user.name "xxxx"
git config --global user.email "your.email@example.com"

3.Create a new repository

git clone git@github.com:xxxx/xxxx.git
cd xxxx
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master

4.Existing folder

cd existing_folder
git init
git remote add origin git@github.com:xxxx/xxxx.git
git add .
git commit -m "Initial commit"
git push -u origin master

5.Existing Git repository

cd existing_repo
git remote rename origin old-origin
git remote add origin git@github.com:xxxx/xxxx.git
git push -u origin --all
git push -u origin --tags

Comments

Popular posts from this blog

Python3 + Django + uWSGI + Nginx On FreeBSD

arduino最小構成 (atmega328/8MHz/3.3V/内部クロック)FT232RLにてブートローダーの書き込み

FreeBSD: Configuring Apache to permit CGI