text git有用的命令

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text git有用的命令相关的知识,希望对你有一定的参考价值。

# How it works:
# git fetch downloads the latest from remote without trying to merge or rebase anything.
# Then the git reset resets the master branch to what you just fetched. The --hard option changes all the files in your working tree to match the files in origin/master.
git fetch --all
git reset --hard origin/master

# grab a branch in git
git fetch
git checkout branch

# create your own branch
git checkout -b <name_of_branch>
# or
git branch <name_of_branch>

# merge master into branch
git checkout feature_branch
git merge master
# or if local master is not up to date
git merge origin/master

# list local branches that do not have remote tracking
git branch -vv | grep -v origin


以上是关于text git有用的命令的主要内容,如果未能解决你的问题,请参考以下文章

text 有用的git别名

text 有用的git别名

sh 有用的Git命令。 #git

markdown 一些有用的Git命令和命令场景的Git备忘单。

超级有用的git reset --hard和git revert命令

markdown git有用的命令