git:如何将当前更改的工作区升级到github中的新版本(标签)

时间:2019-07-17 21:37:57

标签: git github

git:如何将当前更改的工作空间升级到github中的新版本(标签)?

例如,

1. git clone a project at tag 1.0 in github
2. create a branch foo, and made some file changes
   in the branch, staged but not committed
3. the project has a new release 2.0

如何指向新版本2.0并将所有更改拉到foo分支中?

1 个答案:

答案 0 :(得分:0)

我相信您需要做的是:

git fetch --tags
git checkout <destination_branch> //if not checked out
git merge <tag_name>

希望这对您有用!