How to organize project versions in GitHub?

0

I have an old project that was written in Laravel 5.3 , I recently rewrote all the code using the 5.5

My question is how to organize this in Github, currently the master branch supports my project based on Laravel 5.3, locally I have the project rewritten in version 5.5

As a solution, I thought about migrating version 5.3 to another branch and uploading 5.5 to the master, but I do not know if that's how it works. If this is the path, how can I perform these steps?

    
asked by anonymous 23.01.2018 / 14:38

1 answer

1

I always use branches for this.

To use it too, use the command: git checkout -b 5.3 and then git checkout master to return to branch main.

I also always choose to leave everything in the same folder. There are no issues with this (unless you miss some command, for example, git push origin branch_errado ) .

When you use the git checkout master command, files that are in branch 5.3 will not be visible or modifiable. And when using git checkout 5.3 the files that are in branch master will not be visible or modifiable.

Creating branch 5.3 and creating a file

Changingandviewingthemasterbranchfiles

If you run the command git diff master 5.3 , it will show you all the differences.

diff --git a/Agora estou no branch 5.3.txt b/Agora estou no branch 5.3.txt
new file mode 100644
index 0000000..e69de29
  

Back up everything first.

    
23.01.2018 / 16:11