-1

git: how upgrade current changed workspace to a new release(tag) in github?

For example,

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

How to point to the new release 2.0 and pull all changes into the branch foo?

eastwater
  • 4,624
  • 9
  • 49
  • 118
  • Possible duplicate of [Switch to another Git tag](https://stackoverflow.com/questions/4330610/switch-to-another-git-tag) – Obsidian Age Jul 17 '19 at 21:42

1 Answers1

0

I believe what you need to do is:

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

Hope this works for you!

SNReloaded
  • 33
  • 3
  • 6