git初始化操作

Git global setup
git config --global user.name "liulei1"
git config --global user.email "liulei1@wanji.net.cn"
Create a new repository
git clone ssh://git@10.102.1.244:8122/liulei1/test.git
cd test
touch README.md
git add README.md
git commit -m "add README"
git push -u origin master
Push an existing folder
cd existing_folder
git init
git remote add origin ssh://git@10.102.1.244:8122/liulei1/test.git
git add .
git commit -m "Initial commit"
git push -u origin master
Push an existing Git repository
cd existing_repo
git remote rename origin old-origin
git remote add origin ssh://git@10.102.1.244:8122/liulei1/test.git
git push -u origin --all
git push -u origin --tags
posted @ 2023-02-17 10:32  浅情1314  阅读(22)  评论(0编辑  收藏  举报