简体   繁体   中英

Git simple workflow with versions

I am new with GitHub, and I have the following workflow to implement, here it is:

  1. The main branch should hold all versions of the code (so I need a way to name and access versions of the main branch, but I don't know if it's even possible to have different versions on the same Branch)

  2. A branch named " dev " should be used to test new code. When the code has been tested, this branch should be merged to the main branch AND a new version of the main branch should be created .

Is there a way to do this with Git?

ps: I am already using a GitHub repository (not a Git Project)

You can use releases for mark each code version. You can make a release when you deploy a new version and the release take the last commit in the selected branch, so after of release when you see the git log you can see the tags joined to commits.

The releases tags in Github are very useful to perform or dispatch Github actions to perform pipeline actions for integration tests or continuous delivery actions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM