Mac下git用戶名密碼問題


使用git時,不提示輸入用戶名和郵箱是因為在系統里已經保存了信息

應用>>鑰匙串訪問 對其操作即可

 

 

常用命令:

查看用戶名

git config user.name

查看郵箱

git config user.email

設置用戶名

git config --global user.name "julian" 

設置郵箱

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

初始化倉庫

git init

提交到git

git add .         //添加到暫存區
git commit -m '本次提交的備注' 

倉庫狀態

git status    //查看版本庫狀態,什么被修改過但還沒提交的
git diff      //查看當前相對上一次提交修改的內容

 遠程倉庫信息

git remote -v

拉取&推送

git pull
git push origin <tagname>

當前git配置

cat .git/config

查看所有分支

git branch -r 

創建並切換到分支

git checkout -b  xxx

刪除分支

git push origin --delete xxx

修改分支名稱(本地)

git branch -m old_name new_name

 

 

更詳細的 via https://www.cnblogs.com/Angxf/p/10956416.html


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM