赞
踩
git 代理 git
Squash a series of commits and rewrite the history by writing them as one
Take a commit that lives in a separate branch and apply the same changes on the current branch
Restore the status of a file to the last commit (revert changes)
List the commits that involve a specific file, including the commits content
List the repository contributors ordering by the number of commits
Pick every change you haven’t already committed and create a new branch
git rebase -i
git rebase -i
this puts you in the interactive rebasing tool.
这将使您进入交互式基础调整工具。
Type s
to apply squash
to a commit with the previous one. Repeat the s
command for as many commits as you need.
键入s
将squash
应用于上一次提交。 根据需要重复执行s
命令以进行尽可能多的提交。
single commit:
单次提交:
git cherry-pick <commit>
git cherry-pick <commit>
for multiple commits:
对于多个提交:
git cherry-pick <commit1> <commit2> <commit3>
git cherry-pick <commit1> <commit2> <commit3>
git checkout -- <filename>
git checkout -- <filename>
git log --pretty=format:"%h %s" --graph
git log --pretty=format:"%h %s" --graph
git log --pretty=format:"%h - %an, %ar : %s"
git log --pretty=format:"%h - %an, %ar : %s"
git status -s
git status -s
git fetch origin pull/<id>/head:<branch>
git fetch origin pull/<id>/head:<branch>
git checkout <branch>
git checkout <branch>
git log --follow -- <filename>
git log --follow -- <filename>
git log --follow -p -- <filename>
git log --follow -p -- <filename>
git shortlog -s -n
git shortlog -s -n
git revert -n HEAD
git revert -n HEAD
git checkout -b <branch>
git checkout -b <branch>
git rm -r --cached
git rm -r --cached
git branch --contains <commit>
git branch --contains <commit>
git 代理 git
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。