Command

git

16 useful snippets found.

如何暂存更改

git add .

如何创建并切换到新分支

git checkout -b [分支名]

如何列出分支

git branch

如何克隆仓库

git clone [仓库URL]

如何提交更改

git commit -m "[消息]"

如何显示更改

git diff

如何初始化Git仓库

git init

如何查看提交图

git log --oneline --graph --all

如何合并分支

git merge [分支名]

如何拉取远程更改

git pull origin [分支名]

如何推送更改到远程

git push origin [分支名]

如何检查远程URL

git remote -v

如何检查状态

git status

如何暂存更改

git stash

如何切换分支

git switch [分支名]

如何修改远程仓库的URL

git remote set-url origin [新URL]