###1.github本地使用多個key 本地多個keyhtml
###2. remote origin already existslinux
fatal: remote origin already exists.git
git remote rm origin
git remote add origin git@github.com:name/name.git
github
###3. git push後提示 everything up-to-date git服務器
everything up-to-date gitssh
git status
查看狀態
git log
查看日誌
通常的狀況是add或commit失敗git commit
.net
###4. error:failed to push some refs to.......
執行git push origin master
日誌
error:failed to push som refs to.......code
解決failed to push some refs to
git pull origin master
//把遠程服務器github上文件拉回來,再push上去。htm
###5. The following untracked working tree files would be overwritten by checkout:
The following untracked working tree files would be overwritten by checkout: ReadMe.md
git clean -d -fx
//不太熟悉
git stash
//不太熟悉
###命令詳解
git init
//當前目錄下會建立一個.git的目錄
git clone
git add
git commit -m 'comment'
git branch testbranch
//建立分支
git checkout testbranch
//切換到分支
git branch
//查看分支
git branch -r
//查看遠程全部分支
git branch -a
//查看本地和遠程的全部分支
git push origin test
//提交test分支到遠程git庫
git reset
//不太熟悉
git rebase
//不太熟悉
###gitconfig配置文件
win環境下在C:\Documents and Settings$USER下。