git經常使用操做命令

1、切換數據源

git remote -v

git remote remove origin

git remote add origin http://git.egov-china.com/zhangkaichao/ApiAccept.git

git remote add upstream http://git.egov-china.com/ApiJava/ApiAccept

  

 

2、首次推送失敗

git pull origin master –allow-unrelated-histories

git push -u origin master -f

  

 

3、經常使用命令

git init

git add .

git commit -m "first commit" 

git config --global user.email "abcde@qq.com"

git commit -m "first commit"

git remote add origin https://本身的倉庫url地址,

git push -u origin master
相關文章
相關標籤/搜索