[GIT] github gitlab Tutorials
1.Generating a new SSH key pair And copy & paste the PUBLIC SSH key to GitHub(GitLab)
Note:
If you want to change the password of your SSH key pair, you can use
2.Git global setup
3.Create a new repository
4.Existing folder
5.Existing Git repository
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
Post a Comment