2022年2月22日 星期二

git 指令

Git global setup

git config --global user.name "xxName"

git config --global user.email "xxName@xxx.com"


Create a new repository

git clone http://1.2.2.1:44234/xxName/aaa.git

cd asssa

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 http://1.2.2.1:44234/xxName/aaa.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 http://1.2.2.1:44234/xxName/aaa.git

git push -u origin --all

git push -u origin --tags

沒有留言:

張貼留言