git 常用操作

2020-01-15  本文已影响0人  sorry510
git config --global user.name xxx
git config --global user.email xxx@example.com
git config --list
git clone xxx
git clone xxx -b 分支名 重命名
git add xxx
git add --all // 添加所有
gut add xxx --force // 强制添加.gitignore中忽略的文件
git commit -m 'feat:xxx'
git log
git status
git checkout -b 分支名 检出分支或创建分支
git checkout -b 本地分支名 origin/远程分支名
git remote rm origin
git remote add origin https://gitee.com/kingCould/HelloWord.git
git remote set-url origin 你新的远程仓库地址
git stash
git stash pop
git push origin 分支名
git push -u origin 分支名 第一次记录一下default分支
git pull
git pull --no-edit origin master // 忽略编辑
git reset --hard
git branch -a
git branch -d xxx 删除本地分支
git merge dev 当前分支合并dev分支
上一篇 下一篇

猜你喜欢

热点阅读